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 10466 - I have some pb with rotation
I have some pb with rotation
Status: VERIFIED FIXED
Product: GIMP
Classification: Other
Component: Tools
1.x
Other All
: Normal normal
: 1.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2000-05-07 08:45 UTC by jpmartin
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Solves rotation center problems in 1.2 CVS (1.79 KB, patch)
2003-05-04 00:53 UTC, Pedro Gimeno
none Details | Review

Description jpmartin 2001-01-28 15:51:59 UTC
Package: gimp
Version: 1.1.20

Name........: Martin
Email.......: jpmartin@iroise.com
Platform....: linux 2.2.14 Mandrake 7.0
GIMP Version: 1.1.20
GTK Version.: 1.2.6
WM/Version..: kde 1.1.2 or E 0.16.3


-- Other system notes:

--

-- Problem description:
When i take a small picture (20X20) with a zoom 1600%, i have some problem with rotation.
I have some pixels who disappear !
The picture is a 0.0 (RGB) 1600% (i read the indication of gimp !)
It is not beautiful when i do a rotation of 90 deg !
--


-- How to repeat:
Take a 20X20 RGB picture.
Rotate it with a angle of 90 deg !
--


-- Other comments:
The Gimp 1.0.4 do that very well !
--




------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-28 10:51 -------
This bug was previously known as bug 10466 at http://bugs.gnome.org/
http://bugs.gnome.org/show_bug.cgi?id=10466
Originally filed under the gimp product and general component.

The original reporter (jpmartin@iroise.com) of this bug does not have an account here.
Reassigning to the exporter, debbugs-export@bugzilla.gnome.org.
Reassigning to the default owner of the component, egger@suse.de.

Comment 1 Raphaël Quinet 2001-04-26 18:14:02 UTC
Re-assigning all Gimp bugs to default component owner (Gimp bugs list)
Comment 2 Michael Natterer 2002-02-19 16:38:57 UTC
Fixed this in CVS HEAD. Not closing the bug because I'm still
thinking about if and how to backport this to stable...

2002-02-19  Michael Natterer  <mitch@gimp.org>

  Fixed #10466 (disappearing pixels when rotating by 90 deg):

  * app/core/gimpdrawable-transform.c: when transforming backwards
  to find the destination line's sub-pixel source coordinates, we
  need to transform the pixels _center_, not it's upper left corner.

  * app/core/gimpdrawable-transform-utils.[ch]: added
  gimp_drawable_transform_matrix_rotate_center() which takes double
  center coordinates instead of an integer pixel bounding box.

  * app/tools/gimptransformtool.[ch]: use double instead of int for
  all coordinates except the original bounding box.

  * app/tools/gimprotatetool.c: use double whenever touching the
  "center" value, so it can be sub-pixel positioned.
Comment 3 Michael Natterer 2002-02-20 09:59:28 UTC
Good that I didn't backport it yet...

2002-02-20  Michael Natterer  <mitch@gimp.org>

  Oops, yesterday's "fix" for #10466 made it even worse :)

  * app/core/gimpdrawable-transform.c: need the 0.5 offset to
  the pixel's center only for INTERPOLATION_NONE, as the LINEAR
  and CUBIC algorithms already know about their errors.

  * app/tools/gimpperspectivetool.c
  * app/tools/gimpscaletool.c
  * app/tools/gimpsheartool.c: some more s/gint/gdouble/ so the
  tools can detect pointer motions again...
Comment 4 Simon Budig 2002-09-19 00:35:17 UTC
Has this been backported yet? I'm sorry, I currently just have 1.2.3
available and cannot doublecheck, but this should be fixed before
1.2.4 reaches the world...
Comment 5 Pedro Gimeno 2003-05-04 00:52:05 UTC
Here's a patch against current CVS STABLE branch that solves this
particular problem.

There are some issues pending in the HEAD branch, but that's the
subject for a different report.
Comment 6 Pedro Gimeno 2003-05-04 00:53:27 UTC
Created attachment 16242 [details] [review]
Solves rotation center problems in 1.2 CVS
Comment 7 Pedro Gimeno 2003-05-04 01:21:53 UTC
Note that the problem will persist with odd-sized images because the
rotation center must be an integer and thus can't be in the middle of
a pixel. So it would be very good to complement this patch with a
backporting of the gint-to-gdouble changes that Mitch did, at least
for the rotation center.
Comment 8 Sven Neumann 2003-05-04 23:16:29 UTC
The patch is surely an improvement, please commit.
Comment 9 Pedro Gimeno 2003-05-05 19:14:22 UTC
Partial fix submited (works for even-sized images). Will work for all
kinds of images when (if) the center coordinates are converted to
gfloat. I'm leaving this report open; please close if that last issue
is a WONTFIX.

2003-05-05  Pedro Gimeno  <usr352@wanadoo.es>

	* app/transform_core.c (transform_core_do): Deal with the pixel
	centers properly. Fixes bug #10466 for even-sized images.

The change has been ported to 1.3 as well:

2003-05-05  Pedro Gimeno  <usr352@wanadoo.es>

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_affine): Fix copy'n'paste slip in
	coordinates calculation for supersampling code. Transform the
	pixel centers properly. Fixes bug #10466.
Comment 10 Sven Neumann 2003-05-07 15:10:15 UTC
We don't want to backport the integer to double conversion from the
HEAD branch. The remaining issue will not be fixed in 1.2. Closing
this report as FIXED.
Comment 11 Raphaël Quinet 2003-06-20 17:13:33 UTC
The (partial) fix is part of the stable release 1.2.4.  Closing this bug.