I've got a "Bad format index" message... Here is the code
Code: Select all
int bits = pow(2,16)-1;
AnsiString plik = *fname;
GFL_ERROR error;
GFL_COLOR color;
GFL_BITMAP * bmp = gflAllockBitmapEx(GFL_RGB, G[G.High][0].Length, G[G.High][0][0].Length, 16, 3, NULL);
GFL_SAVE_PARAMS params;
gflGetDefaultSaveParams(¶ms);
for(int x=0; x { G[G.High][0].Length; x++){
Application->ProcessMessages();
for(int y=0; y { G[G.High][0][0].Length; y++){
color.Red = (unsigned short)(G[G.High][0][x][y]*bits);
color.Green = (unsigned short)(G[G.High][1][x][y]*bits);
color.Blue = (unsigned short)(G[G.High][2][x][y]*bits);
gflSetColorAt(bmp, x, y, &color);
tp->PB->Progress++;
}
}
error = gflSaveBitmap(plik.c_str(), bmp, ¶ms);
if(error) MessageBox(NULL,gflGetErrorString(error),"Ups...",MB_OK);
gflFreeBitmap(bmp);
------
Where "G" is big Array where I store float numbers (0...1). Where is problem ??
MasA