diff --git a/ChangeLog b/ChangeLog index bc36bf56..cc079a8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ 5/1/18 started 8.6.2 - vips_sink_screen() keeps a ref to the input image ... stops a rare race - fix a minor accidental ABI break in 8.6.0 -> 8.6.1 [remicollet] +- fix read of plane-separate TIFFs with large strips [remicollet] 10/12/17 started 8.6.1 - fix mmap window new/free cycling diff --git a/libvips/foreign/tiff2vips.c b/libvips/foreign/tiff2vips.c index 2ba5faf1..ced03af5 100644 --- a/libvips/foreign/tiff2vips.c +++ b/libvips/foreign/tiff2vips.c @@ -1430,7 +1430,8 @@ rtiff_fill_region_aligned( VipsRegion *out, void *seq, void *a, void *b ) /* Loop over the output region painting in tiles from the file. */ static int -rtiff_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) +rtiff_fill_region( VipsRegion *out, + void *seq, void *a, void *b, gboolean *stop ) { tdata_t *buf = (tdata_t *) seq; Rtiff *rtiff = (Rtiff *) a; @@ -2102,8 +2103,12 @@ rtiff_header_read( Rtiff *rtiff, RtiffHeader *header ) * * If this image has a strip size of over 128 lines, fall back * to TIFFReadScanline(), otherwise use TIFFReadEncodedStrip(). + * + * Don't do this in plane-separate mode. TIFFReadScanline() is + * too fiddly to use in this case. */ - if( header->rows_per_strip > 128 ) { + if( header->rows_per_strip > 128 && + !header->separate ) { header->rows_per_strip = 1; header->strip_size = TIFFScanlineSize( rtiff->tiff ); header->number_of_strips = header->height;