Skip to content

feat: Scale cover images up if they're smaller than the device resolution#964

Merged
daveallie merged 1 commit intocrosspoint-reader:masterfrom
sam-lord:feat/scale-cover-image
Feb 19, 2026
Merged

feat: Scale cover images up if they're smaller than the device resolution#964
daveallie merged 1 commit intocrosspoint-reader:masterfrom
sam-lord:feat/scale-cover-image

Conversation

@sam-lord
Copy link
Contributor

@sam-lord sam-lord commented Feb 18, 2026

Summary

What is the goal of this PR?

  • Implement feature request #954
  • Ensure cover images are scaled up to match the dimensions of the screen, as well as scaled down

What changes are included?

  • Naïve implementation for scaling up the source image

Additional Context

If you find the extra comments to be excessive I can pare them back.

Edit: Fixed title


AI 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? < YES >

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

Both JPEG and PNG BMP converter implementations are updated to enable scaling when target dimensions differ from source dimensions (not just when exceeding them), with enhanced row processing logic to emit multiple output rows per source row during upscaling and refined accumulator reset behavior.

Changes

Cohort / File(s) Summary
Image Scaling and Row Boundary Logic
lib/JpegToBmpConverter/JpegToBmpConverter.cpp, lib/PngToBmpConverter/PngToBmpConverter.cpp
Modified scaling decision from checking dimension excess (>) to checking dimension difference (!=), enabling scaling in all cases. Updated logging messages from "Pre-scaling" to "Scaling" with adjusted phrasing. Replaced single output row boundary checks with loops to emit all output rows when one source row crosses multiple output row boundaries (upscaling support). Enhanced accumulator reset behavior: accumulators now persist across consecutive output rows from the same source row, resetting only when moving to a new source row. Added explanatory comments clarifying multi-row emission and upscaling behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: enabling upscaling of cover images to match device resolution, which aligns with the core modifications in both converter files.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the goal to scale cover images up and down with references to the feature request and specific implementation details.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@sam-lord sam-lord changed the title Scale cover images up if they're smaller than the device resolution feat: Scale cover images up if they're smaller than the device resolution Feb 18, 2026
@sam-lord sam-lord closed this Feb 18, 2026
@sam-lord sam-lord reopened this Feb 18, 2026
Copy link
Member

@daveallie daveallie left a comment

Choose a reason for hiding this comment

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

Confirmed it's working well for a book I have with a small cover

@daveallie daveallie merged commit 6527f43 into crosspoint-reader:master Feb 19, 2026
13 of 16 checks passed
saslv pushed a commit to saslv/crosspoint-reader that referenced this pull request Feb 19, 2026
…tion (crosspoint-reader#964)

## Summary

**What is the goal of this PR?**
* Implement feature request
[crosspoint-reader#954](crosspoint-reader#954)
* Ensure cover images are scaled up to match the dimensions of the
screen, as well as scaled down

**What changes are included?**
* Naïve implementation for scaling up the source image

## Additional Context

If you find the extra comments to be excessive I can pare them back. 

Edit: Fixed title

---

### AI 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? _**< YES >**_
el pushed a commit to el/crosspoint-reader that referenced this pull request Feb 19, 2026
…tion (crosspoint-reader#964)

## Summary

**What is the goal of this PR?**
* Implement feature request
[crosspoint-reader#954](crosspoint-reader#954)
* Ensure cover images are scaled up to match the dimensions of the
screen, as well as scaled down

**What changes are included?**
* Naïve implementation for scaling up the source image

## Additional Context

If you find the extra comments to be excessive I can pare them back. 

Edit: Fixed title

---

### AI 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? _**< YES >**_
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 20, 2026
…tion (crosspoint-reader#964)

## Summary

**What is the goal of this PR?**
* Implement feature request
[crosspoint-reader#954](crosspoint-reader#954)
* Ensure cover images are scaled up to match the dimensions of the
screen, as well as scaled down

**What changes are included?**
* Naïve implementation for scaling up the source image

## Additional Context

If you find the extra comments to be excessive I can pare them back. 

Edit: Fixed title

---

### AI 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? _**< YES >**_
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