semi-transparent bitmap
Albin Engström

How do i load and use a semi-transparent bitmap?, i could not find the answer on the forum so instead i'm making a new thread on the subject.

ngiacomelli

You colour the transparent bitmap regions as RGB 255,0,255 (magic pink). Then you use either of these functions to blit it:

You load the bitmap as normal.

Albin Engström

^^'.. i know that much.. i meant:
how (if it's possible) can i draw some sort of image that's not 100% transparent(parts of it).

gnolam
Albin Engström

I guess i didn't give such an good explanation..
I want to load a picture where some pixels are transparent and others are not.
i don't want the whole picture drawn with the same transparency.

I'm wondering if this is possible.

Ceagon Xylas

Could you make an example in photoshop? (Or another similar program)

Albin Engström

I've added an attachment, it's an example of what i'm trying to do, where the chess-board-look-alike background is the transparency, of course the bitmap can't be used but i'm wondering if this effect is possible with allegro and if so in what kind of format should the image be stored?.

gnolam
Milan Mimica
Quote:

How do i load and use a semi-transparent bitmap?

set_color_conversion(COLORCONV_NONE);
BITMAP *bmp = load_tga(path, NULL);

Evert

For reference, the search term you want is translucent.

Albin Engström

I thank thee, :).

Thread #589410. Printed from Allegro.cc