small tiff save cleanups

This commit is contained in:
John Cupitt 2012-07-13 09:30:52 +01:00
parent 501fabccbe
commit 2c37e77dd8
2 changed files with 3 additions and 22 deletions

19
TODO
View File

@ -1,22 +1,3 @@
- try
vips copy big8.v x.tif[pyramid,bigtiff,tile,tile-width=256,tile-height=256] --vips-progress
where big8.v is >4gb
get:
TIFFFetchDirectory: /tmp/vips-1-0RA3GW.tif: Can not read TIFF directory count
TIFFReadDirectory: /tmp/vips-1-0RA3GW.tif: Failed to read directory at offset 0
vips2tiff: unable to open "/tmp/vips-1-0RA3GW.tif" for input
where /tmp/vips-1-0RA3GW.tif is the largest pyramid layer
perhaps a flushing problem? predictor?
- load an image in nip2
enter

View File

@ -161,8 +161,8 @@
/*
#define DEBUG_VERBOSE
*/
#define DEBUG
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -467,7 +467,7 @@ write_tiff_header( TiffWrite *tw, TIFF *tif, int width, int height )
TIFFSetField( tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
}
if( tw->predictor != -1 )
if( tw->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
TIFFSetField( tif, TIFFTAG_PREDICTOR, tw->predictor );
/* Don't write mad resolutions (eg. zero), it confuses some programs.
@ -1349,7 +1349,7 @@ tiff_copy( TiffWrite *tw, TIFF *out, TIFF *in )
CopyField( TIFFTAG_ROWSPERSTRIP, i32 );
CopyField( TIFFTAG_SUBFILETYPE, i32 );
if( tw->predictor != 1 )
if( tw->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
TIFFSetField( out, TIFFTAG_PREDICTOR, tw->predictor );
/* TIFFTAG_JPEGQUALITY is a pesudo-tag, so we can't copy it.