libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 2bae0b909b32b7edd783d2bf0517c8d575155a39
parent 1a00631a0079f28c22eeb0331bb68d8f6d766c9f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 15 Feb 2009 06:21:50 +0000

handle very wide or high images

Diffstat:
Mdoc/version.texi | 4++--
Msrc/plugins/thumbnail/thumbnailextractor.c | 5+++++
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/doc/version.texi b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 17 November 2008 -@set UPDATED-MONTH November 2008 +@set UPDATED 30 December 2008 +@set UPDATED-MONTH December 2008 @set EDITION 0.5.21 @set VERSION 0.5.21 diff --git a/src/plugins/thumbnail/thumbnailextractor.c b/src/plugins/thumbnail/thumbnailextractor.c @@ -145,6 +145,11 @@ libextractor_thumbnailgtk_extract (const char *filename, height = height * THUMBSIZE / width; width = THUMBSIZE; } + if ( (height == 0) || (width == 0) ) + { + g_object_unref (in); + return prev; + } out = gdk_pixbuf_scale_simple (in, width, height, GDK_INTERP_BILINEAR); g_object_unref (in); thumb = NULL;