mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Add support for page selection with multi-page TIFF input (#1204)
This commit is contained in:
committed by
Lovell Fuller
parent
8ef1532691
commit
b154cd0418
@@ -57,6 +57,12 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
|
||||
throw new Error('Expected width, height and channels for raw pixel input');
|
||||
}
|
||||
}
|
||||
// Page input for multi-page TIFF
|
||||
if (is.defined(inputOptions.page)) {
|
||||
if (is.integer(inputOptions.page) && is.inRange(inputOptions.page, 0, 100000)) {
|
||||
inputDescriptor.page = inputOptions.page;
|
||||
}
|
||||
}
|
||||
// Create new image
|
||||
if (is.defined(inputOptions.create)) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user