Bug 414112 - Rounding problems in Resize Image function
Summary: Rounding problems in Resize Image function
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Resize (other bugs)
Version First Reported In: 6.3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-13 22:00 UTC by Frank Steinmetzger
Modified: 2019-11-14 05:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 7.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Steinmetzger 2019-11-13 22:00:31 UTC
Dear all,

ever since the migration to the different widget styles for plugin parameters (for Qt5?), I’ve been having problems with rounding errors in Showfoto when resizing an image.

An example I just had:
- crop an image to 3600×2400 (3:2 ratio). Now I want to resize it to 2400×1600.
- enter 2400 into the width field and press Tab to apply the field (which focuses the height field)
- the height is calculated to 1599
- enter 1600 into the height field and press Tab again
- now the width is recalculated to 2399


Please have a look at how the missing number is calculated and improve the rounding behaviour.

Thank you for your consideration and all the best.
Comment 1 Maik Qualmann 2019-11-14 05:52:23 UTC
Git commit 50b52bb89ed93f09185b435b4486fc444b46c0e1 by Maik Qualmann.
Committed on 14/11/2019 at 05:51.
Pushed by mqualmann into branch 'master'.

better rounding in the resize tool
FIXED-IN: 7.0.0

M  +2    -1    NEWS
M  +6    -6    core/dplugins/editor/transform/resize/resizetool.cpp

https://invent.kde.org/kde/digikam/commit/50b52bb89ed93f09185b435b4486fc444b46c0e1