diff --git a/libvips/foreign/tiff2vips.c b/libvips/foreign/tiff2vips.c index 1c6bbda2..3095a317 100644 --- a/libvips/foreign/tiff2vips.c +++ b/libvips/foreign/tiff2vips.c @@ -1403,7 +1403,7 @@ tiff2vips_strip_read_interleaved( ReadTiff *rtiff, int y, tdata_t buf ) return( -1 ); p = (VipsPel *) rtiff->plane_buf; - q = (VipsPel *) buf; + q = i * bytes_per_sample + (VipsPel *) buf; for( j = 0; j < pels_per_strip; j++ ) { for( k = 0; k < bytes_per_sample; k++ ) q[k] = p[k];