![]() ![]() However there is a problem with the colors itself. So when i call, say resize("test.bmp", 480, 272, true) it should downsize the picture and save it as a bitmap file. ![]() Header.offset = BMP_MAGIC_SIZE+BMP_HEADER_SIZE+BMP_INFO_SIZE įwrite( &magic, 1, BMP_MAGIC_SIZE, pFile ) įwrite( &header, 1, BMP_HEADER_SIZE, pFile ) įwrite( &info, 1, BMP_INFO_SIZE, pFile ) Header.size = BMP_MAGIC_SIZE+BMP_HEADER_SIZE+BMP_INFO_SIZE+size Void TForm1::SaveBmp( char *file, TRGBTriple *trgb) Src_row = (TRGBTriple*)pBitmap->ScanLine įor( int j=0 jrgbtRed = src_pixel->rgbtRed ĭest_pixel->rgbtGreen = src_pixel->rgbtGreen ĭest_pixel->rgbtBlue = src_pixel->rgbtBlue Graphics::TBitmap *pBitmap = new Graphics::TBitmap() įor( int i=0 iScanLine Void TForm1::resize(AnsiString fileName, int width, int height, bool scaling)
0 Comments
Leave a Reply. |