Opacity of loaded PNG files?

BlitzMax Forums/BlitzMax Programming/Opacity of loaded PNG files?

Bukky(Posted 2006) [#1]
Is there a way to adjust the opacity of a PNG file when it is displayed in Blitz?


Gabriel(Posted 2006) [#2]
Maybe I'm not getting you, but SetAlpha() ?


Amon(Posted 2006) [#3]
psuedo code

loadimage(myimage.png)
setalpha(Alpha)
drawimage myimage
Alpha:+0.1
setalpha(0)


Dreamora(Posted 2006) [#4]
without setblend alphablend this won't do anything at all ;-)


Bukky(Posted 2006) [#5]
I guess my main concerns is over why Blitz ignores the opacity channels in my PNG's. I havent had problems with this in other engines.

Anyone know why this is?


ImaginaryHuman(Posted 2006) [#6]
If it's ignoring the alpha channel altogether you may want to check that your graphics application actually does save the alpha channel that you create. Also as above make sure to setblend alphablend, otherwise it wont be taken into account when drawing.


Bukky(Posted 2006) [#7]
hmmm....what is the syntax for performing the setblen alphablend operation? I cant find any information for it in the manuals or online documentation.


Bukky(Posted 2006) [#8]
nevermind, got it working :)

Thanks guys.

EDIT:

One more thing though, what is the command to revert SetBlend back to its default value?


tonyg(Posted 2006) [#9]
Setblend maskblend