[gthumb] ignore the embedded thumbnail if it's less the 90% of the requested size



commit 2ce12f9569b2964fad1da39482fd9ae4cbc89e90
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun May 29 19:34:00 2011 +0200

    ignore the embedded thumbnail if it's less the 90% of the requested size
    
    this avoids blurred thumbnails generation

 extensions/exiv2_tools/exiv2-utils.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index 7506236..dc89f35 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -1242,7 +1242,7 @@ exiv2_generate_thumbnail (const char *uri,
 		double ratio_delta = (image_ratio > thumbnail_ratio) ? (image_ratio - thumbnail_ratio) : (thumbnail_ratio - image_ratio);
 
 		if ((ratio_delta > MAX_RATIO_ERROR_TOLERANCE) /* the tolerance is used because the reduced image can have a slightly different ratio due to rounding errors */
-		    || (MAX (pixbuf_width, pixbuf_height) < (requested_size / 2))) /* if the embedded image is too small compared to the requested size */
+		    || (MAX (pixbuf_width, pixbuf_height) < (requested_size * 0.90))) /* ignore the embedded image if it's too small compared to the requested size */
 		{
 			g_object_unref (pixbuf);
 			return NULL;



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