LoadImage and transparency

BlitzPlus Forums/BlitzPlus Programming/LoadImage and transparency

rogue(Posted 2004) [#1]
I have some PNG files that have transparency (alpha channel) and when I load them with a call to LoadImage I get them drawing as expected except that all of the black pixels have been turned to transparent as well. Is there a global transparency color that I can change right before calling LoadImage() so I only get my alpha channel as a mask?

- Ken


WolRon(Posted 2004) [#2]
Black is the default mask color.

To change it, use the MaskImage command.


Kevin_(Posted 2004) [#3]
One way to keep your black pixels black and still get transparency around your image it to draw around your image in magenta (255,0,255). Then use maskimage with 255,0,255 as the mask colour.

It works for me.