diff --git a/src/include/ImageJPEG.cpp b/src/include/ImageJPEG.cpp index 9fa508aa..1eb0720f 100644 --- a/src/include/ImageJPEG.cpp +++ b/src/include/ImageJPEG.cpp @@ -420,10 +420,14 @@ bool Image::drawJpegChunk(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t val = RGB3BIT(r, g, b); } - if (invert) - val = 7 - val; - // if (_imagePtrJpeg->getDisplayMode() == INKPLATE_1BIT) - // val = (~val >> 2) & 1; + if (_imagePtrJpeg->getDisplayMode() == INKPLATE_1BIT) { + val = (~val >> 2) & 1; + if (invert) + val = 1 - val; + } else { + if (invert) + val = 7 - val; + } _imagePtrJpeg->writePixel(x + i, y + j, val); #endif