1
0
Fork 0
forked from len0rd/rockbox

Correct pallette->RGB565 conversion when loading 1-bit BMP files.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9101 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2006-03-18 20:34:45 +00:00
parent 69795ab18b
commit c279335ed2

View file

@ -288,10 +288,10 @@ int read_bmp_file(char* filename,
/* Mono -> RGB16 */
for (col = 0; col < width; col++) {
ret = getpix(col, bmpbuf);
unsigned short rgb = (((palette[ret].red >> 3) << 11) |
((palette[ret].green >> 2) << 5) |
((palette[ret].blue >> 3)));
dest[width * (height - row - 1) + col] = rgb;
unsigned short rgb16 = LCD_RGBPACK(palette[ret].red,
palette[ret].green,
palette[ret].blue);
dest[width * (height - row - 1) + col] = rgb16;
}
}
#endif