split saver off
This commit is contained in:
parent
582512ddc4
commit
423b6b4a04
|
@ -1665,9 +1665,15 @@ write_gather( Write *write )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Two basic write patterns: multipage and pyramid. We do single image as a
|
||||||
|
* special case of pyramid.
|
||||||
|
*/
|
||||||
static int
|
static int
|
||||||
write_image( Write *write )
|
write_image( Write *write )
|
||||||
{
|
{
|
||||||
|
if( write->toilet_roll ) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
if( vips_sink_disc( write->im, write_strip, write ) )
|
if( vips_sink_disc( write->im, write_strip, write ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -1675,9 +1681,9 @@ write_image( Write *write )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
if( write->pyramid ) {
|
if( write->pyramid ) {
|
||||||
/* Free lower pyramid resources ... this will TIFFClose() (but
|
/* Free lower pyramid resources ... this will
|
||||||
* not delete) the smaller layers ready for us to read from
|
* TIFFClose() (but not delete) the smaller layers
|
||||||
* them again.
|
* ready for us to read from them again.
|
||||||
*/
|
*/
|
||||||
if( write->layer->below )
|
if( write->layer->below )
|
||||||
pyramid_free( write->layer->below );
|
pyramid_free( write->layer->below );
|
||||||
|
@ -1687,6 +1693,7 @@ write_image( Write *write )
|
||||||
if( write_gather( write ) )
|
if( write_gather( write ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
@ -1716,8 +1723,6 @@ vips__tiff_write( VipsImage *in, const char *filename,
|
||||||
if( vips_check_coding_known( "vips2tiff", in ) )
|
if( vips_check_coding_known( "vips2tiff", in ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
/* Make output image.
|
|
||||||
*/
|
|
||||||
if( !(write = write_new( in, filename,
|
if( !(write = write_new( in, filename,
|
||||||
compression, Q, predictor, profile,
|
compression, Q, predictor, profile,
|
||||||
tile, tile_width, tile_height, pyramid, squash,
|
tile, tile_width, tile_height, pyramid, squash,
|
||||||
|
@ -1757,8 +1762,6 @@ vips__tiff_write_buf( VipsImage *in,
|
||||||
if( vips_check_coding_known( "vips2tiff", in ) )
|
if( vips_check_coding_known( "vips2tiff", in ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
/* Make output image.
|
|
||||||
*/
|
|
||||||
if( !(write = write_new( in, NULL,
|
if( !(write = write_new( in, NULL,
|
||||||
compression, Q, predictor, profile,
|
compression, Q, predictor, profile,
|
||||||
tile, tile_width, tile_height, pyramid, squash,
|
tile, tile_width, tile_height, pyramid, squash,
|
||||||
|
|
Loading…
Reference in New Issue