[gthumb] _gdk_pixbuf_scale_squared: upscale the image if needed



commit 371ecd463162b05148c9a12540eb18a15ea9b742
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jan 9 21:23:49 2011 +0100

    _gdk_pixbuf_scale_squared: upscale the image if needed
    
    upscale the original image if the requested size is bigger than
    the width or the height of the image.

 gthumb/pixbuf-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/pixbuf-utils.c b/gthumb/pixbuf-utils.c
index 8978f37..cfcbe28 100644
--- a/gthumb/pixbuf-utils.c
+++ b/gthumb/pixbuf-utils.c
@@ -223,7 +223,7 @@ _gdk_pixbuf_scale_squared (GdkPixbuf     *p,
 		th = (int) (((double) h / w) * tw);
 	}
 
-	if ((tw < w) || (th < h))
+	if ((tw != w) || (th != h))
 		p1 = _gdk_pixbuf_scale_composite (p, tw, th, interp_type);
 	else
 		p1 = g_object_ref (p);



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