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.
This commit is contained in:
Matthias Clasen 2009-11-05 10:29:34 -05:00
parent 9e51c10edc
commit f4990f6c9d

View File

@ -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;