Lines 922-934
Link Here
|
922 |
} |
922 |
} |
923 |
} |
923 |
} |
924 |
|
924 |
|
925 |
for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) { |
925 |
cinfo->scale_num = 8; |
|
|
926 |
for (cinfo->scale_denom = 2; cinfo->scale_denom <= 16; cinfo->scale_denom += 1) { |
926 |
jpeg_calc_output_dimensions (cinfo); |
927 |
jpeg_calc_output_dimensions (cinfo); |
927 |
if (cinfo->output_width < width || cinfo->output_height < height) { |
928 |
if (cinfo->output_width < width || cinfo->output_height < height) { |
928 |
cinfo->scale_denom /= 2; |
|
|
929 |
break; |
929 |
break; |
930 |
} |
930 |
} |
931 |
} |
931 |
} |
|
|
932 |
cinfo->scale_denom -= 1; |
932 |
jpeg_calc_output_dimensions (cinfo); |
933 |
jpeg_calc_output_dimensions (cinfo); |
933 |
|
934 |
|
934 |
context->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, |
935 |
context->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, |