mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add IIIF layout support to tile-based output (#2098)
This commit is contained in:
@@ -568,7 +568,7 @@ function raw () {
|
||||
* @param {String} [options.depth] how deep to make the pyramid, possible values are `onepixel`, `onetile` or `one`, default based on layout.
|
||||
* @param {Number} [options.skipBlanks=-1] threshold to skip tile generation, a value 0 - 255 for 8-bit images or 0 - 65535 for 16-bit images
|
||||
* @param {String} [options.container='fs'] tile container, with value `fs` (filesystem) or `zip` (compressed file).
|
||||
* @param {String} [options.layout='dz'] filesystem layout, possible values are `dz`, `zoomify` or `google`.
|
||||
* @param {String} [options.layout='dz'] filesystem layout, possible values are `dz`, `iiif`, `zoomify` or `google`.
|
||||
* @returns {Sharp}
|
||||
* @throws {Error} Invalid parameters
|
||||
*/
|
||||
@@ -603,10 +603,10 @@ function tile (options) {
|
||||
}
|
||||
// Layout
|
||||
if (is.defined(options.layout)) {
|
||||
if (is.string(options.layout) && is.inArray(options.layout, ['dz', 'google', 'zoomify'])) {
|
||||
if (is.string(options.layout) && is.inArray(options.layout, ['dz', 'google', 'iiif', 'zoomify'])) {
|
||||
this.options.tileLayout = options.layout;
|
||||
} else {
|
||||
throw is.invalidParameterError('layout', 'one of: dz, google, zoomify', options.layout);
|
||||
throw is.invalidParameterError('layout', 'one of: dz, google, iiif, zoomify', options.layout);
|
||||
}
|
||||
}
|
||||
// Angle of rotation,
|
||||
|
||||
Reference in New Issue
Block a user