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:
parent
69795ab18b
commit
c279335ed2
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue