fix tile clipping in toilet roll images

we were not clipping unaligned tiled correctly
This commit is contained in:
John Cupitt 2020-06-01 13:22:51 +01:00
parent 39af6c21c8
commit d16f1e67dd
2 changed files with 6 additions and 31 deletions

View File

@ -1712,7 +1712,7 @@ rtiff_fill_region_unaligned( VipsRegion *out,
/* Not necessary, but it stops static analyzers complaining
* about a used-before-set.
*/
tile.height = 0;
hit.height = 0;
x = 0;
while( x < r->width ) {
@ -1776,10 +1776,13 @@ rtiff_fill_region_unaligned( VipsRegion *out,
q, p, hit.width, rtiff->client );
}
x += tile.width;
x += hit.width;
}
y += tile.height;
/* This will be the same for all tiles in the row we've just
* done.
*/
y += hit.height;
}
return( 0 );

View File

@ -250,34 +250,6 @@
#include "tiff.h"
/* TODO:
*
* try:
*
* vips copy LuCa-7color_Scan1.ome.tiff[n=5] x.tif[pyramid,tile-width=512,tile-height=512,compression=lzw]
* vips copy x.tif[page=1] x.v
*
* horizontal stripes in image (page 0 is fine) ... a problem in rewind? it
* looks like the stripes are half a tile high
*
* try:
*
* $ vips copy LuCa-7color_Scan1.ome.tiff[subifd=4] x.png
* (vips:1284665): VIPS-WARNING **: 13:59:15.555: error in tile 0 x 0
* source input: Can not read scanlines from a tiled image
* tiff2vips: read error
* vips2png: unable to write to target
*
* subifd=3 seems to work, curiously ... are some subifds tiled and some
* striped? how come we don't pick up tile/strip from the subifd?
*
* try:
*
* vips copy test.tif x.tif[page-height=2048,pyramid]
* vips copy x.tif[page=1] x.png
*
* test.tif is k2.jpg split into bands and joined top to bottom ... no stripes
* visible
*
*
* - have a layout enum rather than a bool
* - revise docs