mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Allow Stream-based input of raw pixel data #1579
This commit is contained in:
@@ -19,6 +19,10 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
|
||||
} else if (is.plainObject(input) && !is.defined(inputOptions)) {
|
||||
// Plain Object descriptor, e.g. create
|
||||
inputOptions = input;
|
||||
if (is.plainObject(inputOptions.raw)) {
|
||||
// Raw Stream
|
||||
inputDescriptor.buffer = [];
|
||||
}
|
||||
} else if (!is.defined(input) && is.object(containerOptions) && containerOptions.allowStream) {
|
||||
// Stream
|
||||
inputDescriptor.buffer = [];
|
||||
|
||||
Reference in New Issue
Block a user