bitmap transparency

I know its possible to make a color completely invisible. I use this already in my game. But I was wondering is there a way to draw a bitmap that is still visible but see through?

Edgar Reynaldo

Yes. Use 32 bit color and alpha channels on your images.


If you want to draw translucent bitmaps onto others, you can use draw_trans. This will exactly do what you want. Other ways may fail :-))

Dizzy Egg

Yeah, what Edgar said. You can create an image in your 'graphics software' with an alpha channel; then, if you save it as something like .png you can load it in A5 and it will use the alpha channel, 32 bits (24 for the colours RGB and 8 bits for the alpha transparency....probably).


could you point me to draw trans in the manual? i can't find it.

Chris Katko

Allegro 4 or 5?


Allegro 5


If you want to draw a bitmap half-transparent only sometimes, instead of editing it to include alpha channel, you could draw it tinted like that:


Thread #614797. Printed from