Merge pull request #359 from gasi/patch-1

Use 254 pixels as default tile size
This commit is contained in:
John Cupitt 2015-12-22 21:15:48 +00:00
commit 2efb5c1718

View File

@ -116,9 +116,9 @@
Overlap handling Overlap handling
For deepzoom, tile-size == 256 and overlap == 1 means that edge tiles are For deepzoom, tile-size == 254 and overlap == 1 means that edge tiles are
257 x 257 (though less at the bottom right) and non-edge tiles are 258 x 255 x 255 (though less at the bottom right) and non-edge tiles are 256 x
258. Tiles are positioned across the image in tile-size steps. This means 256. Tiles are positioned across the image in tile-size steps. This means
(confusingly) that two adjoining tiles will have two pixels in common. (confusingly) that two adjoining tiles will have two pixels in common.
This has caused bugs in the past. This has caused bugs in the past.
@ -1941,7 +1941,7 @@ vips_foreign_save_dz_class_init( VipsForeignSaveDzClass *class )
_( "Tile size in pixels" ), _( "Tile size in pixels" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ), G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ),
1, 8192, 256 ); 1, 8192, 254 );
VIPS_ARG_ENUM( class, "depth", 13, VIPS_ARG_ENUM( class, "depth", 13,
_( "Depth" ), _( "Depth" ),
@ -2002,14 +2002,14 @@ vips_foreign_save_dz_class_init( VipsForeignSaveDzClass *class )
_( "Tile width in pixels" ), _( "Tile width in pixels" ),
VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED,
G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ), G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ),
1, 8192, 256 ); 1, 8192, 254 );
VIPS_ARG_INT( class, "tile_height", 12, VIPS_ARG_INT( class, "tile_height", 12,
_( "Tile height" ), _( "Tile height" ),
_( "Tile height in pixels" ), _( "Tile height in pixels" ),
VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED,
G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ), G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ),
1, 8192, 256 ); 1, 8192, 254 );
} }
@ -2019,7 +2019,7 @@ vips_foreign_save_dz_init( VipsForeignSaveDz *dz )
VIPS_SETSTR( dz->suffix, ".jpeg" ); VIPS_SETSTR( dz->suffix, ".jpeg" );
dz->layout = VIPS_FOREIGN_DZ_LAYOUT_DZ; dz->layout = VIPS_FOREIGN_DZ_LAYOUT_DZ;
dz->overlap = 1; dz->overlap = 1;
dz->tile_size = 256; dz->tile_size = 254;
dz->tile_count = 0; dz->tile_count = 0;
dz->depth = VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL; dz->depth = VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL;
dz->angle = VIPS_ANGLE_D0; dz->angle = VIPS_ANGLE_D0;