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 321511 - rotation tool does not smooth the edges
rotation tool does not smooth the edges
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.2.x
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-11-15 10:01 UTC by Mehdi Kabab
Modified: 2008-01-15 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An example (5.48 KB, image/png)
2006-02-06 18:39 UTC, Mehdi Kabab
Details

Description Mehdi Kabab 2005-11-15 10:01:13 UTC
Please describe the problem:
If the layer has the same size than the image, after rotation the layer's edges
are not smoothed.
It is necessary to increase layer's dimensions before rotation so that layer's
edges are smoothed.

Steps to reproduce:
1. Create new document
2. Add new layer
3. Fill with the color of your choice
4. Tools > Rotation > -8° (for example)

4bis. Layer > Layer Boundary Size > width:+10px  height:+10px Center
5bis. Tools > Rotation > -8° (for example)


Actual results:
In 4. the layer's edges are not smoothed.
In 5bis. the layer's edges are smoothed.

Expected results:
Step 4. should be like step 5bis.

Does this happen every time?
Yes.

Other information:
An example :
http://pioupioum.free.fr/bugs/rotation_bug_smooth.png
Comment 1 michael grosberg 2005-11-22 07:22:30 UTC
This also happens when a rectangular selection is transformed, and applies not
only to rotation but to perspective and shear transformations.
Comment 2 Mehdi Kabab 2006-02-06 18:39:42 UTC
Created attachment 58821 [details]
An example
Comment 3 Raphaël Quinet 2006-02-09 15:23:21 UTC
Since the size of the canvas after rotation is always larger than the original
one and has some room for the extra pixels coming from the antialasing, it would
definitely make sense to ensure that these pixels are put to good use.

Before rotation, we could add a border around the existing layer.  Maybe 1 to 3
pixels, depending on the scaling algorithm used.

An additional improvement would be to enlarge the layer only if necessary:
before scaling, check the pixels on the 4 edges and do not enlarge the layer
along the edges that are already fully transparent.  This would ensure that the
layer does not grow all the time if multiple transformations are applied to it
(multiple transformations are usually a bad idea because of the loss of
precision, but they may be necessary in some cases).
Comment 4 david gowers 2006-03-12 07:28:37 UTC
.. This is caused by the fix to a bug in the perspective transformation, where the edges of the area being transformed would not map exactly to the edges of the shape described by the perspective transform. There, a border of pixels with alpha =0 was presumed (and thus 'shrunk' the area by percolating transparency into it. sometimes in massive amounts)

I know no way to resolve this that would not break the fix for the mentioned bug ( bug #144352 ), and vice versa. It might have to end up as a togglable option.
Comment 5 Sven Neumann 2007-05-23 11:24:35 UTC
This appears to be fixed in recent versions of GIMP 2.3. Probably was fixed when I  cleaned up the PixelSurround code.