Big image cover#140
Conversation
There was a problem hiding this comment.
Hey, thanks for the PR! The idea of fitting covers to the full screen is nice.
However there's a fundamental problem with the approach. Right now covers go through a conversion pipeline (JPEG/PNG → dithered 2-bit BMP) at 450x750. Your code then takes that already-dithered BMP and upscales it at render time with nearest-neighbor. Scaling a dithered image like that produces visible blocky artifacts on the e-ink display — the dithering pattern was computed for 1:1 pixel output.
The fix should happen in the conversion layer, not the renderer. The ImageConvertConfig already has maxWidth/maxHeight — for aspect-fit mode we just need to pass screen dimensions (480x800) there, so the dithering is calculated at the correct output size. No need for a new drawBitmapBySize function at all.
Would you like to rework this using the conversion pipeline approach? Happy to help if you have questions about the codebase.
Summary
Added the ability to select the size of the book cover image when opening the book and in sleep mode