From 0218b6bde592540630600ea28cb5c3889e7fd849 Mon Sep 17 00:00:00 2001 From: Jonas Diemer Date: Wed, 17 Dec 2025 13:17:49 +0100 Subject: [PATCH] Fixed 1bpp inversion --- src/screens/SleepScreen.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/screens/SleepScreen.cpp b/src/screens/SleepScreen.cpp index 5e4a3ae..d7432dd 100644 --- a/src/screens/SleepScreen.cpp +++ b/src/screens/SleepScreen.cpp @@ -130,9 +130,7 @@ uint8_t* loadBMP(const char* filename, int& width, int& height) { int byteIndex = x / 8; int bitIndex = 7 - (x % 8); // MSB first in BMP file format - // In 1-bit BMPs, bit value 1 typically means black and 0 means white - // Check if the bit is set (1) at the specified position - isBlack = (rowBuffer[byteIndex] & (1 << bitIndex)) != 0; + isBlack = (rowBuffer[byteIndex] & (1 << bitIndex)) == 0; } else { // 24-bit // For 24-bit BMPs, convert RGB to grayscale // BMP stores colors as BGR (Blue, Green, Red)