gimp r27612 - in trunk: . app/paint-funcs



Author: neo
Date: Tue Nov 11 07:47:31 2008
New Revision: 27612
URL: http://svn.gnome.org/viewvc/gimp?rev=27612&view=rev

Log:
2008-11-11  Sven Neumann  <sven gimp org>

	Bug 560283 â "Scale image..." causes distortion around edges.

	* app/paint-funcs/scale-region.c (scale): corrected fix for
	bug #556248.



Modified:
   trunk/ChangeLog
   trunk/app/paint-funcs/scale-region.c

Modified: trunk/app/paint-funcs/scale-region.c
==============================================================================
--- trunk/app/paint-funcs/scale-region.c	(original)
+++ trunk/app/paint-funcs/scale-region.c	Tue Nov 11 07:47:31 2008
@@ -509,7 +509,7 @@
       for (y = region.y; y < y1; y++)
         {
           guchar  *pixel = row;
-          gdouble  yfrac = y * scaley + 0.5;
+          gdouble  yfrac = (y + 0.5) * scaley - 0.5;
           gint     sy    = (gint) yfrac;
           gint     x;
 
@@ -517,7 +517,7 @@
 
           for (x = region.x; x < x1; x++)
             {
-              gdouble xfrac = x * scalex + 0.5;
+              gdouble xfrac = (x + 0.5) * scalex - 0.5;
               gint    sx    = (gint) xfrac;
 
               xfrac = xfrac - sx;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]