Created attachment 115838 [details]
Screenshot of Scale to New Size Dialog
I resized an image to 18" x 12" at 300 dpi. It didn't come out as 5400 x 3600, rather 5405 x 3602. I then tried sizing it to 5400 x 3600, and the size was 17.99" x 11.99". There seems to be an error somewhere. Even if done in float, it should have more precision than this.
STEPS TO REPRODUCE
1. With an existing image, attempt to resize it to 18" x 12" @300 dpi.
2. Just look at the dialog. (You don't have to actually do it.)
5405 x 3602 (or 17.99 x 11.99)
5400 x 3600 (or 18.00 x 12.00)
Image attached of the setting 5400 x 3600 case.
This is related to bug https://bugs.kde.org/show_bug.cgi?id=395267 but I am not 100% sure to say they are duplicates.
I don't think it is a duplicate. The other issue is about print sizes and a possible limit for print only. This one has to do with imprecise calculations of image size.
Git commit 03db690749bc2481396c510073a773acb6d3d60f by Wolthera van Hövell tot Westerflier, on behalf of Agata Cacko.
Committed on 02/03/2019 at 11:06.
Pushed by woltherav into branch 'master'.
Fix the conversion errors in Scale to New Size dialog
SpinBoxUnitManager used a function that not only converts units,
but also rounds them (for the View), hence the conversion errors.
This patch changes function to the precise one.
Checking the Scale to New Size dialog to see whether the bug doesn't reproduce.
Checking whether it doesn't break other scale/resize/offset/crop dialogs and every other place
where the units are being used.
Reviewers: #krita, rempt
Reviewed By: #krita, rempt
Differential Revision: https://phabricator.kde.org/D19448
M +1 -1 libs/widgetutils/kis_spin_box_unit_manager.cpp