Page 1 of 1

Fill Colors on Linux

Posted: Sat Jun 18, 2005 6:23 am
by tailormade
I am using the following code to set the image background to white:

error = bitmap.Allocate(GFL_RGB, Width, Height);
bitmap.SetFillColor(GFLW_COLOR(255,255,255));
bitmap.DrawFillRectangle(0, 0, Width, Height);

It works fine on Windows, but produces a purple background on Linux. Any ideas?

Re: Fill Colors on Linux

Posted: Sat Jun 18, 2005 12:49 pm
by xnview
tailormade wrote:I am using the following code to set the image background to white:

error = bitmap.Allocate(GFL_RGB, Width, Height);
bitmap.SetFillColor(GFLW_COLOR(255,255,255));
bitmap.DrawFillRectangle(0, 0, Width, Height);

It works fine on Windows, but produces a purple background on Linux. Any ideas?
And could you post the code used to save picture?

Save Routines

Posted: Sat Jun 18, 2005 2:37 pm
by tailormade
Sure, here is the code I use to save a GIF file (I removed the code for other formats).

GFL_ERROR error;
GFLW_SAVE_PARAMS save_option;
GFLW_FORMAT format;
char ext[5];

strcpy(ext,"gif");
save_option.SetFormat(ext);

bitmap.ChangeColorDepth(GFL_MODE_TO_256COLORS, GFL_MODE_ADAPTIVE);
error = bitmap.SaveIntoFile( OutputFile, save_option );

Re: Save Routines

Posted: Wed Jun 22, 2005 9:10 am
by xnview
tailormade wrote:Sure, here is the code I use to save a GIF file (I removed the code for other formats).

GFL_ERROR error;
GFLW_SAVE_PARAMS save_option;
GFLW_FORMAT format;
char ext[5];

strcpy(ext,"gif");
save_option.SetFormat(ext);

bitmap.ChangeColorDepth(GFL_MODE_TO_256COLORS, GFL_MODE_ADAPTIVE);
error = bitmap.SaveIntoFile( OutputFile, save_option );
Could you send me a PM with your email to send a version?

PM

Posted: Sat Jun 25, 2005 6:48 pm
by tailormade
I have done so. I look forward to the new version.

Scott