Skip to content

Big image cover#140

Open
suslik-50 wants to merge 6 commits into
bigbag:mainfrom
suslik-50:bigImageCover
Open

Big image cover#140
suslik-50 wants to merge 6 commits into
bigbag:mainfrom
suslik-50:bigImageCover

Conversation

@suslik-50

Copy link
Copy Markdown

Summary

Added the ability to select the size of the book cover image when opening the book and in sleep mode

@pliashkov-spm pliashkov-spm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants