mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure limitInputPixels, sequentialRead for composite op #2099
This commit is contained in:
@@ -100,8 +100,10 @@ function composite (images) {
|
||||
if (!is.object(image)) {
|
||||
throw is.invalidParameterError('image to composite', 'object', image);
|
||||
}
|
||||
const { raw, density } = image;
|
||||
const inputOptions = (raw || density) ? { raw, density } : undefined;
|
||||
const { raw, density, limitInputPixels, sequentialRead } = image;
|
||||
const inputOptions = [raw, density, limitInputPixels, sequentialRead].some(is.defined)
|
||||
? { raw, density, limitInputPixels, sequentialRead }
|
||||
: undefined;
|
||||
const composite = {
|
||||
input: this._createInputDescriptor(image.input, inputOptions, { allowStream: false }),
|
||||
blend: 'over',
|
||||
|
||||
Reference in New Issue
Block a user