set scale_num on shrink in jpeg2vips

This commit is contained in:
John Cupitt 2009-10-12 08:21:09 +00:00
parent c7e973b4db
commit 7df1d944ed
2 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,7 @@
- fix up addr calcs on 64-bit machines with >2gb images and inplace ops
(thanks Christoph)
- im_generate() checks that im_demand_hint() has been called for this image
- im_jpeg2vips.c, set scale_num on shrink (thanks Guido)
25/3/09 started 7.18.0
- revised version numbers

View File

@ -24,6 +24,8 @@
* - added "shrink" parameter
* 16/6/09
* - added "fail" option ... fail on any warnings
* 12/10/09
* - also set scale_num on shrink (thanks Guido)
*/
/*
@ -448,7 +450,9 @@ read_jpeg_header( struct jpeg_decompress_struct *cinfo,
*/
jpeg_read_header( cinfo, TRUE );
cinfo->scale_denom = shrink;
cinfo->scale_num = 1;
jpeg_calc_output_dimensions( cinfo );
*invert_pels = FALSE;
switch( cinfo->out_color_space ) {
case JCS_GRAYSCALE: