Novell bug: https://bugzilla.novell.com/show_bug.cgi?id=215507
Upstream bug: http://bugzilla.gnome.org/show_bug.cgi?id=340963

2006-12-07  jacob berkman  <jberkman@novell.com>

	* libeog/eog-image.c (load_size_prepared): scale down if
	  images are very huge, as many svgs from ooodraw are

--- eog-2.12.2/libeog/eog-image.c~	2006-12-07 13:28:10.000000000 -0500
+++ eog-2.12.2/libeog/eog-image.c	2006-12-07 13:42:39.000000000 -0500
@@ -372,9 +372,27 @@ static void
 load_size_prepared (GdkPixbufLoader *loader, gint width, gint height, gpointer data)
 {
 	EogImage *img;
+        GdkScreen *screen;
+        gint screen_width, screen_height;
+        double ratio;
 
 	g_return_if_fail (EOG_IS_IMAGE (data));
 
+        screen = gdk_screen_get_default ();
+        if (screen) {
+            screen_width = gdk_screen_get_width (screen);
+            screen_height = gdk_screen_get_height (screen);
+
+            ratio = MIN ((double)screen_width / (double)width,
+                         (double)screen_height / (double)height);
+
+            if (ratio < 0.4) {
+                width *= ratio;
+                height *= ratio;
+                gdk_pixbuf_loader_set_size (loader, width, height);
+            }
+        }
+
 	img = EOG_IMAGE (data);
 
 	g_mutex_lock (img->priv->status_mutex);
