diff --git a/lib/GfxRenderer/Bitmap.cpp b/lib/GfxRenderer/Bitmap.cpp index 8878a145..2fbdbbd5 100644 --- a/lib/GfxRenderer/Bitmap.cpp +++ b/lib/GfxRenderer/Bitmap.cpp @@ -74,18 +74,18 @@ static inline uint8_t quantizeFloydSteinberg(int gray, int x, int width, int16_t // Quantize to 4 levels (0, 85, 170, 255) uint8_t quantized; int quantizedValue; - if (adjusted < 43) { + if (adjusted < 30) { quantized = 0; - quantizedValue = 0; - } else if (adjusted < 128) { + quantizedValue = 15; + } else if (adjusted < 50) { quantized = 1; - quantizedValue = 85; - } else if (adjusted < 213) { + quantizedValue = 30; + } else if (adjusted < 140) { quantized = 2; - quantizedValue = 170; + quantizedValue = 80; } else { quantized = 3; - quantizedValue = 255; + quantizedValue = 210; } // Calculate error diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index b420cc0c..8b4c881e 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -86,7 +86,7 @@ void SleepActivity::renderCustomSleepScreen() const { if (SdMan.openFileForRead("SLP", filename, file)) { Serial.printf("[%lu] [SLP] Randomly loading: /sleep/%s\n", millis(), files[randomFileIndex].c_str()); delay(100); - Bitmap bitmap(file, true, 50); + Bitmap bitmap(file, true); if (bitmap.parseHeaders() == BmpReaderError::Ok) { renderBitmapSleepScreen(bitmap); dir.close(); @@ -101,7 +101,7 @@ void SleepActivity::renderCustomSleepScreen() const { // render a custom sleep screen instead of the default. FsFile file; if (SdMan.openFileForRead("SLP", "/sleep.bmp", file)) { - Bitmap bitmap(file, true, 50); + Bitmap bitmap(file, true, 0); if (bitmap.parseHeaders() == BmpReaderError::Ok) { Serial.printf("[%lu] [SLP] Loading: /sleep.bmp\n", millis()); renderBitmapSleepScreen(bitmap);