Index: src/eog-image.c
===================================================================
--- src/eog-image.c	(Revision 3988)
+++ src/eog-image.c	(Arbeitskopie)
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#define GDK_PIXBUF_ENABLE_BACKEND
 
 #include "eog-image.h"
 #include "eog-image-private.h"
@@ -46,6 +47,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk-pixbuf/gdk-pixbuf-io.h>
 #include <libgnomevfs/gnome-vfs.h>
 #include <libgnomeui/gnome-thumbnail.h>
 
@@ -393,6 +395,28 @@
 }
 
 static void
+eog_image_pre_size_prepared (GdkPixbufLoader *loader,
+			     gint width,
+			     gint height,
+			     gpointer data)
+{
+	GdkPixbufFormat *format;
+	gboolean *trigger = (gboolean*) data;
+
+	format = gdk_pixbuf_loader_get_format (loader);
+
+	if (format) {
+		if ((format->flags & GDK_PIXBUF_FORMAT_THREADSAFE) == 0) {
+			g_message ("Delay triggered!\n");
+			*trigger = TRUE;
+			g_signal_stop_emission_by_name (loader, "size-prepared");
+		}
+	}
+	else
+		g_warning ("No format yet!?\n");
+}
+
+static void
 eog_image_size_prepared (GdkPixbufLoader *loader, 
 			 gint             width, 
 			 gint             height, 
@@ -864,6 +888,7 @@
 	gboolean failed = FALSE;
 	gboolean first_run = TRUE;
 	gboolean set_metadata = TRUE;
+	gboolean delay_size_prepared = FALSE;
 	gboolean read_image_data = (data2read & EOG_IMAGE_DATA_IMAGE);
 	gboolean read_only_dimension = (data2read & EOG_IMAGE_DATA_DIMENSION) && 
 					!read_image_data;
@@ -915,6 +940,12 @@
 	if (read_image_data || read_only_dimension) {
 		loader = gdk_pixbuf_loader_new ();
 
+		g_signal_connect (loader, 
+				  "size-prepared", 
+				  G_CALLBACK (eog_image_pre_size_prepared),
+				  &delay_size_prepared);
+
+
 		g_signal_connect_object (G_OBJECT (loader), 
 					 "size-prepared", 
 					 G_CALLBACK (eog_image_size_prepared),
@@ -965,12 +996,6 @@
                                 	             _("EXIF not supported for this file format."));
 					break;
 				}
-
-				g_signal_emit (img, 
-					       signals[SIGNAL_SIZE_PREPARED], 
-					       0, 
-					       priv->width, 
-					       priv->height);
                         }
 
 			first_run = FALSE;
@@ -1049,6 +1074,12 @@
 			if (format != NULL) {
 				priv->file_type = gdk_pixbuf_format_get_name (format);
 			}
+			if (delay_size_prepared)
+				g_signal_emit (img, 
+					       signals[SIGNAL_SIZE_PREPARED], 
+					       0, 
+					       priv->width, 
+					       priv->height);
 		}
 	}
 
