diff --git a/ChangeLog b/ChangeLog index ca2331a7..82460769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,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 0f3e5bdb..421a86a3 100644 --- a/libvips/foreign/tiff2vips.c +++ b/libvips/foreign/tiff2vips.c @@ -1435,7 +1435,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; @@ -2107,8 +2108,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;