[gtk+] Fix loading scaled-down jpegs



commit f4990f6c9d20776af0ff87a9cdb0c19b3b0686d4
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 5 10:29:34 2009 -0500

    Fix loading scaled-down jpegs
    
    The assumption that scale_num will be automatically be 1 is no longer
    with libjpeg7. So set it explicitly. Bug #588740.

 gdk-pixbuf/io-jpeg.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index 5435f5b..07308e3 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -922,6 +922,7 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
 			}
 			
 			for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) {
+				cinfo->scale_num = 1;
 				jpeg_calc_output_dimensions (cinfo);
 				if (cinfo->output_width < width || cinfo->output_height < height) {
 					cinfo->scale_denom /= 2;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]