[gnome-raw-thumbnailer] downscale thumbnail if requested size is smaller than it is, do not hardcode 128



commit 5a03b1a9ffece1d38cc0cf91c599975b9f2b028e
Author: Anton Keks <anton codeborne com>
Date:   Thu Jan 2 23:44:03 2014 +0200

    downscale thumbnail if requested size is smaller than it is, do not hardcode 128

 src/raw-thumbnailer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/raw-thumbnailer.c b/src/raw-thumbnailer.c
index b32bc49..135dbe3 100644
--- a/src/raw-thumbnailer.c
+++ b/src/raw-thumbnailer.c
@@ -47,7 +47,7 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, int size)
   height = gdk_pixbuf_get_height (pixbuf);
   width = gdk_pixbuf_get_width (pixbuf);
   
-  if (size <= 128) {
+  if (size < height || size < width) {
     int d_width, d_height;
     
     if (width > height) {
@@ -143,7 +143,7 @@ int main (int argc, char ** argv)
   
   char* inputfname = g_filename_from_uri (uri, NULL, NULL);
   g_free(uri);
-  
+
   pixbuf = or_gdkpixbuf_extract_rotated_thumbnail(inputfname, output_size);
   g_free(inputfname);
   


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