Author: Romain Perier <mrpouet@gentoo.org>
Subject: Ensure gdk-pixbuf is backward compatible with jpeg6, even if it's works with jpeg7
Date: 2009-09-01 10:27 UTC

---
 gdk-pixbuf/io-jpeg.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index cf8c9ed..9af55ba 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -921,8 +921,11 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
 					return FALSE;
 				}
 			}
-			
+#if JPEG_LIB_VERSION >= 70			
+			for (cinfo->scale_denom = 2; cinfo->scale_denom <= 16; cinfo->scale_denom *= 2) {
+#else
 			for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) {
+#endif
 				jpeg_calc_output_dimensions (cinfo);
 				if (cinfo->output_width < width || cinfo->output_height < height) {
 					cinfo->scale_denom /= 2;
