src/processor/image/index

Image processor module
Source:

(require("src/processor/image/index"))(operation) → {function}

Function that takes an array with processing operations and returns a function that can be called with an stream. This stream is converted using the given transformations array.
Parameters:
Name Type Description
operation Object flamingo operation
Source:
Returns:
function to convert a stream
Type
function
Example
image([{ processor: 'sharp', pipe: (sharp) => sharp.toFormat('jpeg') }])(fs.createReadStream('sample.png')
// converted image stream