GNOME Bugzilla – Bug 556248
Scaling gives 'jagged' edges on certain elements
Last modified: 2009-03-21 09:18:10 UTC
The scale tool creates a different result than in the 2.4 releases. The scale function gives much sharper edges in the 2.6 releases. This is great for photos and such but certain elements get 'jagged' edges. How to reproduce: 1. Create new image in GIMP 2. Create new transparent layer 2. Create a white circle 3. Use the shadow filter to create a shadow underneath it 4. Merge the shadow and circle 5. Scale the layer to half its size. Here's an image of what I'm talking about: http://img402.imageshack.us/img402/5026/gimpcompareis5.png The bottom shape was scaled in both 2.6.1 and 2.4.7 to 50% of it's original size with cubic interpolation on (Although I've tried with different interpolation methods and got almost the same result). As you can see, the edges on the left one are smoother and the right are sharper but look odd. This is terrible when designing icons.
Are we talking about the Scale tool or the Scale operation as invoked from the Image or Layers menu?
I get the same result with the scale tool and scale operations in the menus so we're talking about both.
I get the same behavior in 2.6.0. This happens either scaling with the scale tool or scaling an from the menu or scaling a layer. It makes small text look bad and unreadable at smaller resolutions. Plus it make fine lines look terrible. I don't know if this is related but sometimes scaling randomly adds extremely jagged edges. This is not a minor nuisance.
You are right, something is wrong here. I have patch that seems to fix it. Needs some more testing, but I think it is the right fix.
Created attachment 120685 [details] [review] calculate pixel contributions based on pixel centers, not on pixel origins
*** Bug 556417 has been marked as a duplicate of this bug. ***
I've committed this to trunk now so that it gets some more testing before the fix is back-ported to the stable branch.
I have backport this change now. In fact the approach taken for downscaling is inherently broken (as discussed on the mailing-list). This change only improves the situation for the common case of downscaling by a factor of 0.5. That is as much as we can do in 2.6. There's bug #553390 dealing with a better solution for GIMP 2.8.
*** Bug 576123 has been marked as a duplicate of this bug. ***