Incorrect RGB conversion
Posted: Mon May 19, 2014 4:50 pm
Hi,
for the Windows port the RGB565 to RGB32 is implemented as:
The green pixel needlessly is stripped off its least significant bit, i.e. instad of 6 it is treated as a 5-bit color. Here's the fix:
Regards, Zenju
for the Windows port the RGB565 to RGB32 is implemented as:
Code: Select all
#define CONVERT_16_TO_32(pixel)
(((((pixel) >> 11) ) << /*RedShift+3*/ 19) |
((((pixel) >> 6) & 0x1f) << /*GreenShift+3*/11) |
(((pixel) & 0x1f) << /*BlueShift+3*/ 3))
Code: Select all
((((pixel) >> 5) & 0x3f) << /*GreenShift+2*/10) |