Fill Colors on Linux

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
tailormade

Fill Colors on Linux

Post by tailormade » Sat Jun 18, 2005 6:23 am

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?

User avatar
xnview
Author of XnView
Posts: 33617
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Fill Colors on Linux

Post by xnview » Sat Jun 18, 2005 12:49 pm

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?
Pierre.

tailormade

Save Routines

Post by tailormade » Sat Jun 18, 2005 2:37 pm

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 );

User avatar
xnview
Author of XnView
Posts: 33617
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Save Routines

Post by xnview » Wed Jun 22, 2005 9:10 am

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?
Pierre.

tailormade
Posts: 15
Joined: Fri Jun 24, 2005 6:08 pm

PM

Post by tailormade » Sat Jun 25, 2005 6:48 pm

I have done so. I look forward to the new version.

Scott

Post Reply