GNOME Bugzilla – Bug 111468
Zoom tool distorts image
Last modified: 2009-08-15 18:40:50 UTC
Package: GIMP Severity: normal Version: 1.2.3 Synopsis: Zoom tool distorts image Bugzilla-Product: GIMP Bugzilla-Component: Tools Description: Description of Problem: When working at medium zoom levels (other untested) and drawing single pixels at a time, the picture distorts itself, but only on the screen. Steps to reproduce the problem: 1. Zoom in an image to about 400% 2. Use the pencil tool to draw pixels 3. See the image distort on the screen only 4. Move the window and the picture is fixed Actual Results: The pixels surrounding the pixel placed will shift themselves over. Expected Results: I guess there should be no distortion of the pixels. How often does this happen? Every time, sometimes not, if so, go to a different part of the image. Additional Information: I have a copy of the image I was working with at http://www.geocities.com/rpatters.rm/font_working.png (I was working with the file as a pcx, but that shouldn't matter. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-04-23 20:00 ------- Unknown version 1.2.x in product GIMP. Setting version to the default, "unspecified". The original reporter (rpatters@cfl.rr.com) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, bugs@gimp.org.
This is basically a duplicate of bug #109933. This problem has been fixed in CVS but I don't think we will backport the fix to the 1.2 series. So my proposed resolution is WONTFIX.
I'd like to get a comment from Pedro here since he fixed the problem in 1.3 and could tell us if he thinks the fix could be safely backported.
I doubt that the fix can cause any problem as it only enhances accuracy and in no case degrades it as did the accumulated addition. I've removed the RINT stage because it was an excess of paranoia on my side: floor() should always return exact, not approximate integers, so the difference should be an exact integer as well and not cause rounding problems. Aside of that, the fix has been tested in 1.3 for a while and I think that now it can be safely backported. An examination of section 4.2.2A of Knuth's TAOCP did not help in deciding if the patch is failproof, though. Note that I can't reproduce the bug with the steps given by the original reporter (and the test image is not currently available), even if I've seen some weird behaviour in Gimp 1.2.3 occasionally when zooming. It's likely to be compiler- or architecture-dependent. Would be good that someone who can reproduce the problem more or less consistently can tell if the patch below (against current CVS, stable branch) solves it.
Created attachment 16089 [details] [review] Backport of fix for bug #109933
Please include "libgimp/gimpmath.h" instead of <math.h>. OK to commit otherwise.
Fixed in STABLE branch, thus closing the bug: 2003-04-29 Pedro Gimeno <usr352@wanadoo.es> * app/image_render.c: merged fix for bug #109933 from HEAD branch.
*** Bug 99672 has been marked as a duplicate of this bug. ***
The fix is part of the stable release 1.2.4. Closing this bug.