mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Ensure limitInputPixels, sequentialRead for composite op #2099
This commit is contained in:
parent
a90dbcc808
commit
95eae905f0
@ -17,6 +17,9 @@ Requires libvips v8.9.1
|
||||
* Ensure correct ordering of rotate-then-trim operations.
|
||||
[#2087](https://github.com/lovell/sharp/issues/2087)
|
||||
|
||||
* Ensure composite accepts `limitInputPixels` and `sequentialRead` input options.
|
||||
[#2099](https://github.com/lovell/sharp/issues/2099)
|
||||
|
||||
## v0.24 - "*wit*"
|
||||
|
||||
Requires libvips v8.9.0.
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user