[gdk-pixbuf] Too much rounding when scaling the pixbufs.



commit cd2ec42d55abd5b47a32564528dee453b9ab59fd
Author: Xabier Rodriguez Calvar <xrcalvar igalia com>
Date:   Mon Jul 30 18:45:03 2012 +0200

    Too much rounding when scaling the pixbufs.
    
    The former code was causing that some frames where 1 pixel bigger than
    the animation.

 gdk-pixbuf/gdk-pixbuf-scaled-anim.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-scaled-anim.c b/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
index 9fbe5a2..da7e7a2 100644
--- a/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
+++ b/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
@@ -138,8 +138,8 @@ get_scaled_pixbuf (GdkPixbufScaledAnim *scaled,
 
 	/* Get a new scaled pixbuf */
 	scaled->current  = gdk_pixbuf_scale_simple (pixbuf, 
-                        MAX((int) (round((gdouble) gdk_pixbuf_get_width (pixbuf) * scaled->xscale + .5)), 1),
-                        MAX((int) (round((gdouble) gdk_pixbuf_get_height (pixbuf) * scaled->yscale + .5)), 1),
+                        MAX((int) ((gdouble) gdk_pixbuf_get_width (pixbuf) * scaled->xscale + .5), 1),
+                        MAX((int) ((gdouble) gdk_pixbuf_get_height (pixbuf) * scaled->yscale + .5), 1),
 			GDK_INTERP_BILINEAR);
 
 	/* Copy the original pixbuf options to the scaled pixbuf */



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