[AD] About kryten2's bug

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


I just realized that the new KEEP_TRANS mechanism makes it possible to fix
the grabber bug, because the dithering mode can now preserve the pink mask
color.

Therefore I propose to add an option (check box) to the grabber in order to
enable/disable the KEEP_TRANS flag.

Moreover as we have now a explicit transparency preserving mechanism, I also
propose to get rid of the limitations on paletted modes. As Elias pointed it
out, Allegro currently has a implicit support for keeping transparency in
8-bit mode: it treats index 0 as a special index (best_fit_color() almost
never returns it, RGB mapping tables never contain index 0,
get_optimized_palette() sets index 0 to pink by default and so on...).

I propose to let best_fit_color() and RGB mapping tables treat index 0 as
any other index, so that makecol8() does the same. If the user wants to
preserve transparency on a per-pixel basis, he can simply do it by hand,
otherwise for bitmap color conversion he uses the KEEP_TRANS flag.
Similarly, I propose to change the behaviour of get_optimized_palette() so
as to make it build 'adapted' palettes only if the KEEP_TRANS flag is set.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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