Add support for writing dz format to zip container (#402)

To enable this you can either use the `.zip` or `.szi` file extensions
or use `.tile({container: 'zip'})` with the `.dzi` extension.
This commit is contained in:
Felix Bünemann
2016-04-08 20:58:13 +02:00
committed by Lovell Fuller
parent ef61da3051
commit b224874332
8 changed files with 107 additions and 4 deletions

View File

@@ -527,14 +527,17 @@ The default behaviour, when `withMetadata` is not used, is to strip all metadata
#### tile(options)
The size, overlap and directory layout to use when generating square Deep Zoom image pyramid tiles.
The size, overlap, container and directory layout to use when generating square Deep Zoom image pyramid tiles.
`options` is an Object with one or more of the following attributes:
* `size` is an integral Number between 1 and 8192. The default value is 256 pixels.
* `overlap` is an integral Number between 0 and 8192. The default value is 0 pixels.
* `container` is a String, with value `fs` or `zip`. The default value is `fs`.
* `layout` is a String, with value `dz`, `zoomify` or `google`. The default value is `dz`.
You can also use the file extension .zip or .szi to write to a ZIP container instead of the filesystem.
```javascript
sharp('input.tiff')
.tile({