Index: eog-3.6.2/src/eog-window.c
===================================================================
--- eog-3.6.2.orig/src/eog-window.c	2013-05-09 23:43:52.000000000 +0200
+++ eog-3.6.2/src/eog-window.c	2013-05-09 23:45:55.233060702 +0200
@@ -1240,13 +1240,11 @@
 		if ((img_width + deco_width > screen_width) ||
 		    (img_height + deco_height > screen_height))
 		{
-			double factor;
-
-			if (img_width > img_height) {
-				factor = (screen_width * 0.75 - deco_width) / (double) img_width;
-			} else {
-				factor = (screen_height * 0.75 - deco_height) / (double) img_height;
-			}
+			double width_factor, height_factor, factor;
+			
+			width_factor = (screen_width * 0.75 - deco_width) / (double) img_width;
+			height_factor = (screen_height * 0.75 - deco_height) / (double) img_height;
+			factor = MIN (width_factor, height_factor);
 
 			img_width = img_width * factor;
 			img_height = img_height * factor;
