Fix FS#7044 - if the color RGB(0,255,255) is in a bmp it will be replaced with the current foreground colour

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13878 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-07-14 09:19:46 +00:00
parent 5890f60137
commit 60e7472f72
4 changed files with 4 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -727,7 +727,9 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
int i;
for(i = 0;i < width;i++)
{
if(src[i] != TRANSPARENT_COLOR)
if (src[i] == REPLACEWITHFG_COLOR)
dst[i] = fg_pattern;
else if(src[i] != TRANSPARENT_COLOR)
dst[i] = src[i];
}
src += stride;

View file

@ -291,6 +291,7 @@ enum
#define FORMAT_REMOTE 0x10000000
#define TRANSPARENT_COLOR LCD_RGBPACK(255,0,255)
#define REPLACEWITHFG_COLOR LCD_RGBPACK(0,255,255)
struct bitmap {
int width;