[gimp/gimp-2-8] Bug 592628: Scale Image adds asymmetric artifacts to image edges



commit e09233f08074212db8994bfffbca6ec3ecbefe32
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sat Oct 13 14:56:47 2012 +0200

    Bug 592628: Scale Image adds asymmetric artifacts to image edges
    
    first problem described.

 app/paint-funcs/scale-region.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/paint-funcs/scale-region.c b/app/paint-funcs/scale-region.c
index 751005b..9907d46 100644
--- a/app/paint-funcs/scale-region.c
+++ b/app/paint-funcs/scale-region.c
@@ -436,7 +436,7 @@ scale (TileManager           *srcTM,
         {
           guchar  *pixel = row;
           gdouble  yfrac = (y + 0.5) * scaley - 0.5;
-          gint     sy    = (gint) yfrac;
+          gint     sy    = floor (yfrac);
           gint     x;
 
           yfrac = yfrac - sy;
@@ -444,7 +444,7 @@ scale (TileManager           *srcTM,
           for (x = region.x; x < x1; x++)
             {
               gdouble xfrac = (x + 0.5) * scalex - 0.5;
-              gint    sx    = (gint) xfrac;
+              gint    sx    = floor (xfrac);
 
               xfrac = xfrac - sx;
 



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