diff --git a/lib/GfxRenderer/Bitmap.cpp b/lib/GfxRenderer/Bitmap.cpp index 2fbdbbd5..dac17892 100644 --- a/lib/GfxRenderer/Bitmap.cpp +++ b/lib/GfxRenderer/Bitmap.cpp @@ -34,7 +34,19 @@ static inline uint8_t boostBrightness(int gray, uint8_t boost) { return gray; } // Simple quantization without dithering - just divide into 4 levels -static inline uint8_t quantizeSimple(int gray) { return static_cast(gray >> 6); } +static inline uint8_t quantizeSimple(int gray) { + // return static_cast(gray >> 6); + + if (gray < 50) { + return 0; + } else if (gray < 70) { + return 1; + } else if (gray < 140) { + return 2; + } else { + return 3; + } +} // Hash-based noise dithering - survives downsampling without moiré artifacts static inline uint8_t quantizeNoise(int gray, int x, int y) { @@ -279,7 +291,6 @@ BmpReaderError Bitmap::readNextRow(uint8_t* data, uint8_t* rowBuffer) const { false); } else { // Simple quantization or noise dithering - color = quantize(boostBrightness(lum, brightnessBoost), currentX, prevRowY); } currentOutByte |= (color << bitShift); diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 8b4c881e..7a44dd5d 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -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, 0); + Bitmap bitmap(file, true); if (bitmap.parseHeaders() == BmpReaderError::Ok) { Serial.printf("[%lu] [SLP] Loading: /sleep.bmp\n", millis()); renderBitmapSleepScreen(bitmap);