Skip to content

Commit b6f05dd

Browse files
8bitkicksandeepmistry
authored andcommitted
RGB16 red masked to 5 bits
Prevents high green bits overlapping to low red.
1 parent 670049c commit b6f05dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ArduinoGraphics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void ArduinoGraphics::imageRGB16(const Image& img, int x, int y, int width, int
298298
for (int i = 0; i < width; i++) {
299299
uint16_t pixel = *data++;
300300

301-
set(x + i, y + j, (pixel >> 8), ((pixel >> 3) & 0xfc), (pixel << 3) & 0xf8);
301+
set(x + i, y + j, ((pixel >> 8) & 0xf8), ((pixel >> 3) & 0xfc), (pixel << 3) & 0xf8);
302302
}
303303

304304
data += (img.width() - width);

0 commit comments

Comments
 (0)