Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix FB2 covers in grayscale mode #611

Merged

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented Jan 11, 2025

Use LVDrawBuf::Draw (which already handles scaling) instead of the buggier LVDrawBuf::DrawRescaled.

Additionally, don't compile unused lvdrawbuf code. Example code size reduction for release builds:
- android-arm64: -15.1 KB
- emu-x86_64: -19.4 KB
- kindlepw2: -10.9 KB


This change is Reviewable

Copy link
Contributor

@poire-z poire-z left a comment

Choose a reason for hiding this comment

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

May be mention "fb2" in the PR title and commit message.
I think drawCoverTo() is only used to draw the cover of FB2 books (on the first page, itself not being a real page book).
Trusting you on the equivalence. Only FB2 readers can give feedback.

Example code size reduction for release builds:
- `android-arm64`: -15.1 KB
- `emu-x86_64`: -19.4 KB
- `kindlepw2`: -10.9 KB
@benoit-pierre benoit-pierre force-pushed the pr/fix_covers_in_grayscale_mode branch from 70afd66 to 3ab68d4 Compare January 11, 2025 21:15
@benoit-pierre benoit-pierre changed the title fix covers in grayscale mode fix FB2 covers in grayscale mode Jan 11, 2025
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

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

Strange

@poire-z poire-z merged commit 3e1ee18 into koreader:master Jan 13, 2025
1 check passed
@benoit-pierre benoit-pierre deleted the pr/fix_covers_in_grayscale_mode branch January 13, 2025 19:15
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.

3 participants