How does Alpha work?

BlitzMax Forums/BlitzMax Programming/How does Alpha work?

Brucey(Posted 2007) [#1]
I've written an RGB image loader (SGI RGB format), but I'm having trouble getting the Alpha layer to work properly.

It seems to either be On or Off, despite range values between 0 and 255 being loaded into the alpha values.

Am I missing something very obvious?

I thought that PF_RGBA8888 has the bytes 0, 1, 2, 3 as R, G, B, A per pixel, or am I wrong ?

All the colours come out correctly... just the alpha that isn't working...


Brucey(Posted 2007) [#2]
Nevermind.... Do'h !!!

SetBlend ALPHABLEND - seems to do the trick with my DrawImage..


Funny how you can spend ages debugging and checking your original code for errors when all along it was something else that was wrong ;-)

Bugger...


FlameDuck(Posted 2007) [#3]
Yeah, that ones a real Gotcha! I hate it when that happens.