[AD] auto convert bitmap mask to alpha channel

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Attached is an implementation of a proposal to allow the programmer to
have Allegro auto convert a color mask to an alpha channel upon
loading an image. It's most useful when loading a font:

al_enable_load_bitmap_mask(al_map_rgb(255,0,255));
font = al_load_font("a4font.bmp");
al_disable_load_bitmap_mask();

I realize you could load the bitmap, convert the mask, save it as a
tga file, reload the font, etc. It's mostly meant as a way not to
scare people transitioning from A4 with lots of old data files.

Alternatively, there could be an al_load_masked_bitmap_font() or something.

Or people could just be told to suck it up and convert all of their
files. I have no strong feelings about it.

--
Matthew Leverton

Attachment: a5_iio.h.diff
Description: Binary data

Attachment: iio.c.diff
Description: Binary data

Attachment: iio.txt.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/