From 881049a96f57102fa9d6c8abc08c52607aca43e5 Mon Sep 17 00:00:00 2001 From: 8bitkick <8bitkick@users.noreply.github.com> Date: Wed, 10 Apr 2019 21:08:06 -0700 Subject: [PATCH] RGB16 red masked to 5 bits Prevents high green bits overlapping to low red. --- src/ArduinoGraphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ArduinoGraphics.cpp b/src/ArduinoGraphics.cpp index e80e4b3..bedd1a7 100644 --- a/src/ArduinoGraphics.cpp +++ b/src/ArduinoGraphics.cpp @@ -298,7 +298,7 @@ void ArduinoGraphics::imageRGB16(const Image& img, int x, int y, int width, int for (int i = 0; i < width; i++) { uint16_t pixel = *data++; - set(x + i, y + j, (pixel >> 8), ((pixel >> 3) & 0xfc), (pixel << 3) & 0xf8); + set(x + i, y + j, ((pixel >> 8) & 0xf8), ((pixel >> 3) & 0xfc), (pixel << 3) & 0xf8); } data += (img.width() - width);