Skip to content

Fix scaling detection for portrait displays#256

Merged
Shinyzenith merged 1 commit intowaycrate:mainfrom
AndreasBackx:fixes-andreas
Dec 27, 2025
Merged

Fix scaling detection for portrait displays#256
Shinyzenith merged 1 commit intowaycrate:mainfrom
AndreasBackx:fixes-andreas

Conversation

@AndreasBackx
Copy link
Member

Fixed calculating the needed resize for portrait displays. The Size struct passed to image_util::rotate_image_buffer was at some moment changed to include the transformation already but wasn't changed there.

Tested using the following setup:

  1. Left: 1.25 scale 4K portrait
  2. Middle: 1.25 scale 4K landscape
  3. Right: 1.25 scale and 4K portrait that was changed to 1.0 scale to see if it worked.

JPG used below as PNGs were too big to upload here.

With 1.0 scale on the right portrait

Before

wayshot-2025_12_27-13_05_04

After

wayshot-2025_12_27-13_05_52

With 1.25 scale on the right portrait

Before

wayshot-2025_12_27-13_06_57

After

wayshot-2025_12_27-13_06_52

@Shinyzenith
Copy link
Member

Thanks for the detailed fix! ❤️👏

@Shinyzenith Shinyzenith merged commit b1f567e into waycrate:main Dec 27, 2025
5 checks passed
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.63%. Comparing base (418952f) to head (d7a77f1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
libwayshot/src/image_util.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
- Coverage   19.63%   19.63%   -0.01%     
==========================================
  Files          13       13              
  Lines        2704     2705       +1     
==========================================
  Hits          531      531              
- Misses       2173     2174       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants