GNOME Bugzilla – Bug 336259
problems when scaling by height in inches
Last modified: 2008-01-15 13:06:27 UTC
Please describe the problem: When attempting to scale an image by height using inches (instead of pixels), the value for the height will sometimes reset to the original value when pressing "Scale" or enter. Behavior is not consistent, sometimes it will scale the image, sometimes it will not. This behavior is not noticed when units are set to Pixels. Steps to reproduce: 1. Load up an image. 2. Go into scale 3. Change units to inches 4. Change the height. 5. Press Enter. Actual results: It will reset the height to the original height. Expected results: It should reset the width so that the aspect ratio remains constant given the new height. Does this happen every time? No. Other information: I am using Fedora Core 5 with the x86_64 architecture, problem was not seen on an i386 computer. Problem is present both in GIMP 2.2.10 and 2.2.8
This problem affects not just "Scale Image" but also "Resize Canvas" and "Scale Layer", in all recent versions of GIMP. The problem is that the test for whether X or Y has changed, in the chainbutton code in gimp_coordinates_callback(), did not allow for the rounding error that occurs when the units are changed. Fixed by applying ROUND() to the new and old refvals before comparing them. I am only applying this change to HEAD for now (and changing target to 2.4), but it would be simple to apply to 2.2 as well. 2006-05-19 Bill Skaggs <weskaggs@primate.ucdavis.edu> * libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): use ROUND() to prevent incorrect chainbutton logic. Fixes bug #336259.
Reopening and setting milestone to 2.2. This needs to be fixed in the 2.2 tree. That was why the 2.2 milestone was set in the first place. Please respect this.
Okay, changes applied to the 2-2 branch as well: 2006-5-22 Bill Skaggs <weskaggs@primate.ucdavis.edu> Merge from Head: * libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): use ROUND() to prevent incorrect chainbutton logic. Fixes bug #336259.