From bc95531f2dcd4e6eb2b207016a390fb066b4461a Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 13 Feb 2024 22:40:10 +0000 Subject: [PATCH] Docs: clarify skipBlanks default for tile-based output --- docs/api-output.md | 2 +- lib/output.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-output.md b/docs/api-output.md index 98182318b..f59feb544 100644 --- a/docs/api-output.md +++ b/docs/api-output.md @@ -763,7 +763,7 @@ The prebuilt binaries do not include this - see | [options.angle] | number | 0 | tile angle of rotation, must be a multiple of 90. | | [options.background] | string \| Object | "{r: 255, g: 255, b: 255, alpha: 1}" | background colour, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to white without transparency. | | [options.depth] | string | | how deep to make the pyramid, possible values are `onepixel`, `onetile` or `one`, default based on layout. | -| [options.skipBlanks] | number | -1 | threshold to skip tile generation, a value 0 - 255 for 8-bit images or 0 - 65535 for 16-bit images | +| [options.skipBlanks] | number | -1 | Threshold to skip tile generation. Range is 0-255 for 8-bit images, 0-65535 for 16-bit images. Default is 5 for `google` layout, -1 (no skip) otherwise. | | [options.container] | string | "'fs'" | tile container, with value `fs` (filesystem) or `zip` (compressed file). | | [options.layout] | string | "'dz'" | filesystem layout, possible values are `dz`, `iiif`, `iiif3`, `zoomify` or `google`. | | [options.centre] | boolean | false | centre image in tile. | diff --git a/lib/output.js b/lib/output.js index ede2f14a5..f1bba663a 100644 --- a/lib/output.js +++ b/lib/output.js @@ -1233,7 +1233,7 @@ function raw (options) { * @param {number} [options.angle=0] tile angle of rotation, must be a multiple of 90. * @param {string|Object} [options.background={r: 255, g: 255, b: 255, alpha: 1}] - background colour, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to white without transparency. * @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 {number} [options.skipBlanks=-1] Threshold to skip tile generation. Range is 0-255 for 8-bit images, 0-65535 for 16-bit images. Default is 5 for `google` layout, -1 (no skip) otherwise. * @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`, `iiif`, `iiif3`, `zoomify` or `google`. * @param {boolean} [options.centre=false] centre image in tile.