diff --git a/docs/api-output.md b/docs/api-output.md index 5ff48754b..42e92b389 100644 --- a/docs/api-output.md +++ b/docs/api-output.md @@ -278,10 +278,10 @@ Warning: multiple sharp instances concurrently producing tile output can expose - `tile.size` **[Number][8]** tile size in pixels, a value between 1 and 8192. (optional, default `256`) - `tile.overlap` **[Number][8]** tile overlap in pixels, a value between 0 and 8192. (optional, default `0`) - `tile.angle` **[Number][8]** tile angle of rotation, must be a multiple of 90. (optional, default `0`) + - `tile.depth` **[String][1]?** how deep to make the pyramid, possible values are `onepixel`, `onetile` or `one`, default based on layout. - `tile.container` **[String][1]** tile container, with value `fs` (filesystem) or `zip` (compressed file). (optional, default `'fs'`) - - `tile.layout` **[String][1]** filesystem layout, possible values are `dz`, `zoomify` or `google`. (optional, default `'dz'`) - - `tile.depth` **[String][1]** pyramid depth, possible values are `onepixel`, `onetile` or `one`. (optional, default - libvips selects one based on layout) - + - `tile.layout` **[String][1]** filesystem layout, possible values are `dz`, `zoomify` or `google`. (optional, default `'dz'`) + ### Examples ```javascript diff --git a/docs/changelog.md b/docs/changelog.md index e731b8db8..51043a09d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -29,6 +29,10 @@ Requires libvips v8.6.1. * Ensure extractChannel works with 16-bit images. [#1330](https://github.com/lovell/sharp/issues/1330) +* Expose depth option for tile-based output. + [#1342](https://github.com/lovell/sharp/pull/1342) + [@alundavies](https://github.com/alundavies) + * Add experimental entropy field to stats response. #### v0.20.5 - 27th June 2018 diff --git a/docs/index.md b/docs/index.md index eb656c047..d5c5147a7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -115,6 +115,7 @@ the help and code contributions of the following people: * [Tom Lokhorst](https://github.com/tomlokhorst) * [Espen Hovlandsdal](https://github.com/rexxars) * [Sylvain Dumont](https://github.com/sylvaindumont) +* [Alun Davies](https://github.com/alundavies) Thank you! diff --git a/lib/output.js b/lib/output.js index 5585b087e..4cd6fbc68 100644 --- a/lib/output.js +++ b/lib/output.js @@ -423,7 +423,7 @@ function toFormat (format, options) { * @param {Number} [tile.size=256] tile size in pixels, a value between 1 and 8192. * @param {Number} [tile.overlap=0] tile overlap in pixels, a value between 0 and 8192. * @param {Number} [tile.angle=0] tile angle of rotation, must be a multiple of 90. - * @param {String} [tile.depth] depth to shrink tiles, with value 'onepixel', 'onetile' or 'one', default based on layout + * @param {String} [tile.depth] how deep to make the pyramid, possible values are `onepixel`, `onetile` or `one`, default based on layout. * @param {String} [tile.container='fs'] tile container, with value `fs` (filesystem) or `zip` (compressed file). * @param {String} [tile.layout='dz'] filesystem layout, possible values are `dz`, `zoomify` or `google`. * @returns {Sharp} diff --git a/package.json b/package.json index 6d15b3c1d..853a95d2b 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,8 @@ "Nathan Graves ", "Tom Lokhorst ", "Espen Hovlandsdal ", - "Sylvain Dumont " + "Sylvain Dumont ", + "Alun Davies " ], "scripts": { "install": "(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)",