Page 1 of 1

Creating and saving the semi-transparent picture in GflAx

Posted: Sat Feb 05, 2005 1:56 pm
by rozi
Anybody had any success creating and saving semi-transparent PNG, TIFF or any other image file supporting alpha chanels in GflAx?

I have this GIF image, I transform it to RGB and then try to replace several colors with white transparency 0xFFFFFFFF:

Code: Select all

pic.ChangeColorDepth(AX_ToTrueColors);

pic.ReplaceColor(0x606060, 0xffffffff, 1);
pic.ReplaceColor(0x464646, 0xffffffff, 1);
pic.ReplaceColor(0xffffff, 0xffffffff, 1);
I need then to draw this picture on top of another one using alpha blend, but since DrawImage can draw only images stored on disk, I have to save my image first. But after examining the saved file I can't find any alpha information in it, regardles to say, the DrawImage draws it totaly opaque.

Re: Creating and saving the semi-transparent picture in GflA

Posted: Tue Feb 08, 2005 10:07 am
by xnview
rozi wrote:Anybody had any success creating and saving semi-transparent PNG, TIFF or any other image file supporting alpha chanels in GflAx?

I have this GIF image, I transform it to RGB and then try to replace several colors with white transparency 0xFFFFFFFF:

Code: Select all

pic.ChangeColorDepth(AX_ToTrueColors);

pic.ReplaceColor(0x606060, 0xffffffff, 1);
pic.ReplaceColor(0x464646, 0xffffffff, 1);
pic.ReplaceColor(0xffffff, 0xffffffff, 1);
I need then to draw this picture on top of another one using alpha blend, but since DrawImage can draw only images stored on disk, I have to save my image first. But after examining the saved file I can't find any alpha information in it, regardles to say, the DrawImage draws it totaly opaque.
Yes, it's a problem because AX_ToTrueColors convert the picture in 24bits, not in 32bits. So perhaps a new type AX_To32bits??