Bug 414112

Summary: Rounding problems in Resize Image function
Product: [Applications] digikam Reporter: Frank Steinmetzger <dev+kde>
Component: Plugin-Editor-ResizeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 6.3.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 7.0.0
Sentry Crash Report:

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