Conversation
- Add JpegToBmpConverter::getJpegDimensions() to extract JPEG dimensions - Fix getCoverBmpPath() ternary operator precedence bug - Pre-calculate exact dimensions per mode: * FIT: width=480px, height=(480*jpegHeight)/jpegWidth * CROP: height=800px, width=(800*jpegWidth)/jpegHeight - Generate separate cache files (cover_fit.bmp vs cover_crop.bmp) - Eliminates runtime scaling artifacts, improves sleep screen clarity
pablohc
pushed a commit
that referenced
this pull request
Feb 12, 2026
Address review comments #1 and crosspoint-reader#7: - Replace all file-scope global variables (gRenderer, gConfig, gScale, gCacheBuffer, etc.) with a PngContext struct passed through pDraw->pUser - Unify file I/O callbacks to use pFile->fHandle instead of global FsFile* - Remove the unused FsFile opened at the start of decodeToFramebuffer() that was never used for actual decoding (duplicate open) - Use shared PixelCache from PixelCache.h instead of hand-rolled globals
pablohc
pushed a commit
that referenced
this pull request
Feb 14, 2026
Address review comments #1 and crosspoint-reader#7: - Replace all file-scope global variables (gRenderer, gConfig, gScale, gCacheBuffer, etc.) with a PngContext struct passed through pDraw->pUser - Unify file I/O callbacks to use pFile->fHandle instead of global FsFile* - Remove the unused FsFile opened at the start of decodeToFramebuffer() that was never used for actual decoding (duplicate open) - Use shared PixelCache from PixelCache.h instead of hand-rolled globals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What is the goal of this PR?
Implement pre-calculated dimensions for EPUB cover image rendering in sleep screen modes (FIT and CROP) to eliminate runtime scaling artifacts and improve visual clarity.
What changes are included?
Additional Context
Visual Improvements:
Testing Completed:
cover_fit.bmpvscover_crop.bmp) are created per modeAI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? < PARTIALLY >