better iiif tile naming
We were clipping edge tiles against the size of the scaled up layer. Instead, clip against the size of the top level image. See https://github.com/libvips/libvips/issues/1621
This commit is contained in:
parent
6f0548dc5c
commit
efd62acccd
|
@ -1,3 +1,6 @@
|
|||
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]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# also update the version number in the m4 macros below
|
||||
|
||||
AC_INIT([vips], [8.9.2], [vipsip@jiscmail.ac.uk])
|
||||
AC_INIT([vips], [8.9.3], [vipsip@jiscmail.ac.uk])
|
||||
# required for gobject-introspection
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
|
@ -18,7 +18,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||
# user-visible library versioning
|
||||
m4_define([vips_major_version], [8])
|
||||
m4_define([vips_minor_version], [9])
|
||||
m4_define([vips_micro_version], [2])
|
||||
m4_define([vips_micro_version], [3])
|
||||
m4_define([vips_version],
|
||||
[vips_major_version.vips_minor_version.vips_micro_version])
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
* - add @no_strip
|
||||
* 9/11/19
|
||||
* - add IIIF layout
|
||||
* 24/4/20 [IllyaMoskvin]
|
||||
* - better IIIF tile naming
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1357,6 +1359,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];
|
||||
|
@ -1419,13 +1422,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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue