Page 1 of 1

[Implemented] Loading the PNG Alpha-Channel

Posted: Wed Apr 07, 2004 1:16 pm
by freedimension
It seems as though the alpha-channel of a PNG is not loaded into memory. Could that be fixed for the next version?
P.S.: No, I'm not talking about displaying this alpha-channel with DrawImage.

Posted: Wed Apr 07, 2004 3:04 pm
by robink
I think loading and Displaying the AlphaChannel would be a very cool feature!

Posted: Wed Apr 07, 2004 4:06 pm
by Kale
This would be very cool! I would love to display graphics on apps (using the image gadget) with nice blended edges instead of hard bitmap type edges. Hard bitmap edges look so crap when people start changing the windows to their prefered colour.

Posted: Thu Apr 08, 2004 11:45 am
by freedimension
See here:

viewtopic.php?t=10190&start=15

Though it does not load the alpha-channel of a PNG automatically, it's the result that does matter and not the how, isn't it?

Posted: Thu Apr 08, 2004 11:49 am
by freedimension
Kale wrote:This would be very cool! I would love to display graphics on apps (using the image gadget) with nice blended edges instead of hard bitmap type edges. Hard bitmap edges look so crap when people start changing the windows to their prefered colour.
As the image-gadget is a Window, this is IMHO not possible.

Posted: Thu Apr 08, 2004 2:16 pm
by Kris_a
It would probably be possible if you drew directly to the window's DC

Posted: Thu Apr 08, 2004 4:32 pm
by Kale
See here:
viewtopic.php?t=10190&start=15
Though it does not load the alpha-channel of a PNG automatically, it's the result that does matter and not the how, isn't it?
Does your lib provide a way of loading a grayscale alpha channel for use as a transparency mask for an image like .png? Or does it just provide a way of just selecting 1 colour to make transparent (which is what i don't want). :?:

Posted: Thu Apr 08, 2004 5:38 pm
by freedimension
There are two functions X2D_DrawTransparentImage and X2D_DrawAlphaImage. The first will "cut out" a single color, the second can do Alpha-Transparency with and without masks. For more detail just download the 30k ;-)

Posted: Thu Apr 08, 2004 7:48 pm
by Kale
There are two functions X2D_DrawTransparentImage and X2D_DrawAlphaImage. The first will "cut out" a single color, the second can do Alpha-Transparency with and without masks. For more detail just download the 30k
*STUNNED* 8O Very nice work freedimension, X2D_DrawAlphaImage is (for me) a wish come true! :D

Posted: Thu Apr 08, 2004 10:16 pm
by freedimension
Kale wrote:*STUNNED* 8O Very nice work freedimension, X2D_DrawAlphaImage is (for me) a wish come true! :D
Don't forget to read the license ;-)

Posted: Fri Apr 09, 2004 9:32 am
by Fred
freedimension wrote: Don't forget to read the license ;-)
:lol: