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?
Fill Colors on Linux
Moderators: helmut, XnTriq, xnview
-
- Author of XnView
- Posts: 45870
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Fill Colors on Linux
And could you post the code used to save picture?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?
Pierre.
Save Routines
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 );
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 );
-
- Author of XnView
- Posts: 45870
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Save Routines
Could you send me a PM with your email to send a version?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 );
Pierre.