Merge remote-tracking branch 'origin/master'

This commit is contained in:
John Cupitt 2013-03-01 18:12:17 +00:00
commit 579dd3a26e
2 changed files with 17 additions and 14 deletions

View File

@ -4,7 +4,8 @@
- fix another dzsave corner-case (thanks Martin) - fix another dzsave corner-case (thanks Martin)
- neater output for "header" - neater output for "header"
- added VIPS_META_LOADER: record the loader name - added VIPS_META_LOADER: record the loader name
= header displays this hint = header displays this loader hint
- vipsthumbnail is better at cache sizing
31/8/12 started 7.31.0 31/8/12 started 7.31.0
- redone im_Lab2XYZ(), im_XYZ2Lab(), im_Lab2LCh(), im_LCh2Lab(), im_UCS2LCh, - redone im_Lab2XYZ(), im_XYZ2Lab(), im_Lab2LCh(), im_LCh2Lab(), im_UCS2LCh,

View File

@ -157,6 +157,9 @@ shrink_factor( IMAGE *in, IMAGE *out,
VipsImage **s = (VipsImage **) VipsImage **s = (VipsImage **)
vips_object_local_array( VIPS_OBJECT( out ), 1 ); vips_object_local_array( VIPS_OBJECT( out ), 1 );
IMAGE *x; IMAGE *x;
int tile_width;
int tile_height;
int nlines;
if( im_open_local_array( out, t, 9, "thumbnail", "p" ) ) if( im_open_local_array( out, t, 9, "thumbnail", "p" ) )
return( -1 ); return( -1 );
@ -181,9 +184,10 @@ shrink_factor( IMAGE *in, IMAGE *out,
x = t[1]; x = t[1];
} }
/* Shrink! if( im_shrink( x, t[2], shrink, shrink ) )
* return( -1 );
* We want to make sure we read the image sequentially.
/* We want to make sure we read the image sequentially.
* However, the convolution we may be doing later will force us * However, the convolution we may be doing later will force us
* into SMALLTILE or maybe FATSTRIP mode and that will break * into SMALLTILE or maybe FATSTRIP mode and that will break
* sequentiality. * sequentiality.
@ -191,13 +195,14 @@ shrink_factor( IMAGE *in, IMAGE *out,
* So ... read into a cache where tiles are scanlines, and make sure * So ... read into a cache where tiles are scanlines, and make sure
* we keep enough scanlines to be able to serve a line of tiles. * we keep enough scanlines to be able to serve a line of tiles.
*/ */
if( im_shrink( x, t[2], shrink, shrink ) || vips_get_tile_size( t[2],
vips_tilecache( t[2], &s[0], &tile_width, &tile_height, &nlines );
"tile_width", t[2]->Xsize, if( vips_tilecache( t[2], &s[0],
"tile_height", 1, "tile_width", t[2]->Xsize,
"max_tiles", VIPS__TILE_HEIGHT * 2, "tile_height", 10,
"strategy", VIPS_CACHE_SEQUENTIAL, "max_tiles", (nlines * 2) / 10,
NULL ) || "strategy", VIPS_CACHE_SEQUENTIAL,
NULL ) ||
im_affinei_all( s[0], t[4], im_affinei_all( s[0], t[4],
interp, residual, 0, 0, residual, 0, 0 ) ) interp, residual, 0, 0, residual, 0, 0 ) )
return( -1 ); return( -1 );
@ -256,9 +261,6 @@ shrink_factor( IMAGE *in, IMAGE *out,
if( verbose ) if( verbose )
printf( "deleting profile from output image\n" ); printf( "deleting profile from output image\n" );
/* Only try to remove if it exists to avoid extra error
* messages.
*/
if( im_meta_get_typeof( x, IM_META_ICC_NAME ) && if( im_meta_get_typeof( x, IM_META_ICC_NAME ) &&
!im_meta_remove( x, IM_META_ICC_NAME ) ) !im_meta_remove( x, IM_META_ICC_NAME ) )
return( -1 ); return( -1 );