[gthumb] thumb loader: give priority to the internal loaders



commit 3f4626335f97930e11a1e4c285f9e8710062fbcc
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Jun 24 18:22:20 2013 +0200

    thumb loader: give priority to the internal loaders

 gthumb/gth-thumb-loader.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gthumb/gth-thumb-loader.c b/gthumb/gth-thumb-loader.c
index 2123c11..f99d57a 100644
--- a/gthumb/gth-thumb-loader.c
+++ b/gthumb/gth-thumb-loader.c
@@ -172,16 +172,12 @@ generate_thumbnail (GInputStream  *istream,
                g_object_unref (pixbuf);
        }
        else {
-               GthImageFormat     preferred_format;
                GthImageLoaderFunc thumbnailer;
 
-               /* Prefer the internal loader for jpeg images to load rotated
-                * images correctly. */
-               if (strcmp (mime_type, "image/jpeg") == 0)
-                       preferred_format = GTH_IMAGE_FORMAT_CAIRO_SURFACE;
-               else
-                       preferred_format = GTH_IMAGE_FORMAT_GDK_PIXBUF;
-               thumbnailer = gth_main_get_image_loader_func (mime_type, preferred_format);
+               /* prefer the GTH_IMAGE_FORMAT_CAIRO_SURFACE format to give
+                * priority to the internal loaders. */
+
+               thumbnailer = gth_main_get_image_loader_func (mime_type, GTH_IMAGE_FORMAT_CAIRO_SURFACE);
                if (thumbnailer != NULL)
                        image = thumbnailer (istream,
                                             file_data,


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