[gthumb] Fixed creation of blur thumbnails for jpeg images
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Fixed creation of blur thumbnails for jpeg images
- Date: Sun, 17 Feb 2013 13:38:27 +0000 (UTC)
commit 3fe809b981e89b72357a299f5346da8e55b2cabc
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Feb 17 14:34:40 2013 +0100
Fixed creation of blur thumbnails for jpeg images
extensions/cairo_io/cairo-image-surface-jpeg.c | 2 +-
extensions/exiv2_tools/exiv2-utils.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/cairo_io/cairo-image-surface-jpeg.c b/extensions/cairo_io/cairo-image-surface-jpeg.c
index 3d685ed..66f12d3 100644
--- a/extensions/cairo_io/cairo-image-surface-jpeg.c
+++ b/extensions/cairo_io/cairo-image-surface-jpeg.c
@@ -205,7 +205,7 @@ _cairo_image_surface_create_from_jpeg (GInputStream *istream,
for (srcinfo.scale_denom = 1; srcinfo.scale_denom <= 16; srcinfo.scale_denom++) {
jpeg_calc_output_dimensions (&srcinfo);
if ((srcinfo.output_width < requested_size) || (srcinfo.output_height <
requested_size)) {
- srcinfo.scale_denom += 1;
+ srcinfo.scale_denom -= 1;
break;
}
}
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index d478621..e1365bd 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -1405,7 +1405,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 * 0.90))) /* ignore the embedded
image if it's too small compared to the requested size */
+ || (MAX (pixbuf_width, pixbuf_height) < requested_size)) /* 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]