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



Author: neo
Date: Wed Oct 15 22:43:27 2008
New Revision: 27292
URL: http://svn.gnome.org/viewvc/gimp?rev=27292&view=rev

Log:
2008-10-16  Sven Neumann  <sven gimp org>

	Bug 556248 â Scaling gives 'jagged' edges

	* app/paint-funcs/scale-region.c (scale): calculate pixel
	contributions based on pixel centers, not on pixel origins.



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	Wed Oct 15 22:43:27 2008
@@ -522,7 +522,7 @@
       for (y = region.y; y < y1; y++)
         {
           guchar  *pixel = row;
-          gdouble  yfrac = y / scaley;
+          gdouble  yfrac = y / scaley + 0.5;
           gint     sy0   = (gint) yfrac;
           gint     x;
 
@@ -530,7 +530,7 @@
 
           for (x = region.x; x < x1; x++)
             {
-              gdouble xfrac = x / scalex;
+              gdouble xfrac = x / scalex + 0.5;
               gint    sx0   = (gint) xfrac;
 
               xfrac = xfrac - sx0;



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