After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 556248 - Scaling gives 'jagged' edges on certain elements
Scaling gives 'jagged' edges on certain elements
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.1
Other All
: Normal major
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
: 556417 576123 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-14 10:58 UTC by Tom Andersson
Modified: 2009-03-21 09:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
calculate pixel contributions based on pixel centers, not on pixel origins (793 bytes, patch)
2008-10-15 22:36 UTC, Sven Neumann
committed Details | Review

Description Tom Andersson 2008-10-14 10:58:51 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.
Comment 1 Sven Neumann 2008-10-14 17:57:35 UTC
Are we talking about the Scale tool or the Scale operation as invoked from the Image or Layers menu? 
Comment 2 Tom Andersson 2008-10-15 07:30:37 UTC
I get the same result with the scale tool and scale operations in the menus so we're talking about both.
Comment 3 shanesemler 2008-10-15 22:19:10 UTC
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.
Comment 4 Sven Neumann 2008-10-15 22:35:42 UTC
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.
Comment 5 Sven Neumann 2008-10-15 22:36:55 UTC
Created attachment 120685 [details] [review]
calculate pixel contributions based on pixel centers, not on pixel origins
Comment 6 Sven Neumann 2008-10-15 22:41:54 UTC
*** Bug 556417 has been marked as a duplicate of this bug. ***
Comment 7 Sven Neumann 2008-10-15 22:44:09 UTC
I've committed this to trunk now so that it gets some more testing before the fix is back-ported to the stable branch.
Comment 8 Sven Neumann 2008-10-23 22:15:35 UTC
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.
Comment 9 Sven Neumann 2009-03-21 09:18:10 UTC
*** Bug 576123 has been marked as a duplicate of this bug. ***