diff --git a/ChangeLog b/ChangeLog index 6ee6ecb3..350c63f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,9 @@ - flood fill could stop half-way for some very complex shapes - better handling of unaligned reads in multipage tiffs [petoor] +24/4/20 started 8.9.3 +- better iiif tile naming [IllyaMoskvin] + 31/1/19 started 8.9.2 - fix a deadlock with --vips-leak [DarthSim] - better gifload behaviour for DISPOSAL_UNSPECIFIED [DarthSim] diff --git a/configure.ac b/configure.ac index 605c4702..2c712caf 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog` # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=54 -LIBRARY_REVISION=2 +LIBRARY_REVISION=3 LIBRARY_AGE=12 # patched into include/vips/version.h diff --git a/libvips/foreign/dzsave.c b/libvips/foreign/dzsave.c index 5a53fcdd..d0e2a98a 100644 --- a/libvips/foreign/dzsave.c +++ b/libvips/foreign/dzsave.c @@ -85,6 +85,8 @@ * - add @no_strip * 9/11/19 * - add IIIF layout + * 24/4/20 [IllyaMoskvin] + * - better IIIF tile naming */ /* @@ -1360,6 +1362,7 @@ static GsfOutput * tile_name( Layer *layer, int x, int y ) { VipsForeignSaveDz *dz = layer->dz; + VipsForeignSave *save = (VipsForeignSave *) dz; GsfOutput *out; char name[VIPS_PATH_MAX]; @@ -1422,13 +1425,16 @@ tile_name( Layer *layer, int x, int y ) { /* Tiles are addressed in full resolution coordinates, so * scale up by layer->sub and dz->tile_size + * + * We always clip against the full-sized image, not the scaled + * up layer. */ int left = x * dz->tile_size * layer->sub; int top = y * dz->tile_size * layer->sub; int width = VIPS_MIN( dz->tile_size * layer->sub, - layer->width * layer->sub - left ); + save->ready->Xsize - left ); int height = VIPS_MIN( dz->tile_size * layer->sub, - layer->height * layer->sub - top ); + save->ready->Ysize - top ); /* IIIF "size" is just real tile width, I think. *