Does ALPHA work in PNG images ?

BlitzMax Forums/BlitzMax Programming/Does ALPHA work in PNG images ?

skn3(Posted 2004) [#1]
I tried creating a png image with an alpha layer and it seemed as if bmax ignored it. Is there a certain method for getting bmax to recognise/load it ?


Dreamora(Posted 2004) [#2]
If you loaded as pixmap: did you use the right format? ( one of those that support alpha )


skn3(Posted 2004) [#3]


I didn't load as a pixmap, I'll take a look at that.


skn3(Posted 2004) [#4]
Pixmaps dont work for this (I just tried), besides they are of no use if you wanted to use an image with alpha, in a game.


Wayward(Posted 2004) [#5]
I tried creating a png image with an alpha layer and it seemed as if bmax ignored it. Is there a certain method for getting bmax to recognise/load it?

You might need to set the correct blend mode like this:
SetBlend( ALPHABLEND )



skn3(Posted 2004) [#6]
That is a correct alpha layer. I didn't realise you had to set a global blend mode. Added SetBlend(ALPHABLEND) and it worked fine. Nice one :)