diff --git a/docs/api-constructor.md b/docs/api-constructor.md index e5cfacd5..69689bab 100644 --- a/docs/api-constructor.md +++ b/docs/api-constructor.md @@ -20,6 +20,7 @@ to decode images, even if the data is corrupt or invalid. Set this flag to true if you'd rather halt processing and raise an error when loading invalid images. (optional, default `false`) - `options.density` **[Number][9]** integral number representing the DPI for vector images. (optional, default `72`) + - `options.page` **[Number][9]** page number to extract for multi-page input (GIF, TIFF) (optional, default `0`) - `options.raw` **[Object][7]?** describes raw pixel input image data. See `raw()` for pixel ordering. - `options.raw.width` **[Number][9]?** - `options.raw.height` **[Number][9]?** diff --git a/docs/changelog.md b/docs/changelog.md index ef7e4c01..e86af8f7 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -14,6 +14,10 @@ Requires libvips v8.6.1. [#1165](https://github.com/lovell/sharp/pull/1165) [@oncletom](https://github.com/oncletom) +* Add support for page selection with multi-page input (GIF/TIFF). + [#1204](https://github.com/lovell/sharp/pull/1204) + [@woolite64](https://github.com/woolite64) + #### v0.20.1 - 17th March 2018 * Improve installation experience when a globally-installed libvips below the minimum required version is found. diff --git a/docs/index.md b/docs/index.md index ecaecec2..40234e3c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -111,6 +111,7 @@ the help and code contributions of the following people: * [Andrea Bianco](https://github.com/BiancoA) * [Rik Heywood](https://github.com/rikh42) * [Thomas Parisot](https://github.com/oncletom) +* [Nathan Graves](https://github.com/woolite64) Thank you! diff --git a/lib/constructor.js b/lib/constructor.js index 5776c69f..2ec20f8c 100644 --- a/lib/constructor.js +++ b/lib/constructor.js @@ -97,6 +97,7 @@ const debuglog = util.debuglog('sharp'); * to decode images, even if the data is corrupt or invalid. Set this flag to true * if you'd rather halt processing and raise an error when loading invalid images. * @param {Number} [options.density=72] - integral number representing the DPI for vector images. + * @param {Number} [options.page=0] - page number to extract for multi-page input (GIF, TIFF) * @param {Object} [options.raw] - describes raw pixel input image data. See `raw()` for pixel ordering. * @param {Number} [options.raw.width] * @param {Number} [options.raw.height]