Should have tested that last minute edit!
This commit is contained in:
Bodmer
2017-11-24 15:03:24 +00:00
parent 449c421915
commit 218dd1b06e

View File

@@ -4297,11 +4297,12 @@ uint16_t TFT_eSprite::readPixel(int32_t x, int32_t y)
} }
uint16_t color = _img8[x + y * _iwidth]; uint16_t color = _img8[x + y * _iwidth];
if (color != 0) if (color != 0) {
uint8_t blue[] = {0, 11, 21, 31}; uint8_t blue[] = {0, 11, 21, 31};
color = (color & 0xE0)<<8 | (color & 0xC0)<<5 color = (color & 0xE0)<<8 | (color & 0xC0)<<5
| (color & 0x1C)<<6 | (color & 0x1C)<<3 | (color & 0x1C)<<6 | (color & 0x1C)<<3
| blue[color & 0x03]; | blue[color & 0x03];
}
return color; return color;
} }