Mercurial > mplayer.hg
diff gui/util/bitmap.h @ 33534:22c3241467b3
Remove function Normalize().
This function changed ARGB data as if it had been RGB24 data (not quite
correctly) converted to ARGB with all colors transparent.
Instead now, set the alpha channel for RGB24 data and leave ARGB data
untouched.
For X11, the alpha channel is disregarded, so both approaches are equal,
but the new one is more intelligible as we get correct ARGB PNG data.
For legacy reasons, all kind of fuchsia/magenta must be treated as
transparent, because some skins are using at least both full opaque and
full transparent fuchsia/magenta for transparency.
author | ib |
---|---|
date | Thu, 16 Jun 2011 11:19:15 +0000 |
parents | 5f3171d4d7a4 |
children | c5a19bbeac2b |
line wrap: on
line diff
--- a/gui/util/bitmap.h Thu Jun 16 09:27:31 2011 +0000 +++ b/gui/util/bitmap.h Thu Jun 16 11:19:15 2011 +0000 @@ -19,7 +19,11 @@ #ifndef MPLAYER_GUI_BITMAP_H #define MPLAYER_GUI_BITMAP_H -#define TRANSPARENT 0x00ff00ff // transparent color (fuchsia/magenta) +#define TRANSPARENT 0xffff00ff // transparent color (opaque fuchsia/magenta) +#define ALPHA_OPAQUE 0xff000000 + +// for legacy reasons, we must treat all kind of fuchsia/magenta as transparent +#define IS_TRANSPARENT(c) ((ALPHA_OPAQUE | (c)) == TRANSPARENT) typedef struct { unsigned long Width;