Index: app/display/gimpdisplayshell.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell.c,v
retrieving revision 1.236
diff -u -b -r1.236 gimpdisplayshell.c
--- app/display/gimpdisplayshell.c	7 Feb 2003 17:10:05 -0000	1.236
+++ app/display/gimpdisplayshell.c	21 Feb 2003 14:46:08 -0000
@@ -26,6 +26,7 @@
 #include "display-types.h"
 #include "tools/tools-types.h"
 
+
 #ifdef __GNUC__
 #warning FIXME #include "gui/gui-types.h"
 #endif
@@ -392,6 +393,19 @@
   return TRUE;
 }
 
+
+static gboolean 
+gimp_large_image (const GimpImage *img)
+{
+  /* FIXME: This is an experimental solution: Consider the image to be "large",
+            i.e. too large for startup in overview mode to be practical,
+	    if it is wider or higher than a certain number of screen-fulls,
+	    currently 4. */
+
+  return (img->width > 4*gdk_screen_width () || 
+	  img->height > 4*gdk_screen_height ());
+}
+
 GtkWidget *
 gimp_display_shell_new (GimpDisplay     *gdisp,
                         guint            scale,
@@ -444,6 +458,7 @@
   n_width  = SCALEX (shell, image_width);
   n_height = SCALEX (shell, image_height);
 
+  if(!gimp_large_image (gdisp->gimage)) {
   /*  Limit to the size of the screen...  */
   while (n_width > s_width || n_height > s_height)
     {
@@ -464,8 +479,27 @@
       if (scaledest == 1 && scalesrc == 0xFF)
         break;
     }
-
+  } else {
+    /* "Large image" version: Set up display size like above, but do NOT
+       try to scale down so that the entire image may be displayed.
+       With large (i.e. larger than free memory) images, we need to
+       work on a small section at a time, and allow the rest to wait in
+       the swap; trying to display the entire image puts too high demand
+       on the system. */
+    
+    if(n_width > s_width)
+      n_width=s_width;
+
+    if(n_height > s_height)
+      n_height=s_height;
+
+    /* *** FIXME: Find out if we want to force "true" size (even that could
+                  require too much memory.)
+       shell->dot_for_dot = FALSE; 
+    */
+  }
   shell->scale = (scaledest << 8) + scalesrc;
+
 
   shell->menubar_factory = gimp_menu_factory_menu_new (menu_factory,
                                                        "<Image>",
