APPLYING TO TRANSPARENCIAS IMAGES

Blitz3D Forums/Blitz3D Programming/APPLYING TO TRANSPARENCIAS IMAGES

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well, like Ross says images don't have alpha, only 3d textures have alpha. Images ignore the alpha byte, they only have a mask color and any pixel of that color value will be transparent/invisible.

If it's a simple fade to background color then you want to code a function to fade an image. Something like this:
FadeImage(sourceimage,targetimage,fade,time)
Then you could just call that in your main loop until it's done.

If you don't need the image after the fade then you could do something like this:
FadeImage(image,fade,time)
The first is better because you can fade/unfade an image and you also don't loose the image after the fade.

You need to know about Read/WritePixelFast, etc. and know how to separate the 32-bit color into bytes using And, etc. so you can then reduce each component by the fade amount and then add them back together.