I had thought that the output was optional for the Node API usage like in the CLI.
I kept getting the message "Error: undefined is required when passing image as buffer". There's a check for the output file name if the input is a buffer.
I think this should be replaced
if (Buffer.isBuffer(input)) {
if (!outputFileName) {
throw new Error(`${outputFileName} is required when passing image as buffer`);
}
with this
if (Buffer.isBuffer(input)) {
if (!outputFileName) {
throw new Error("OutputFileName is required when passing image as buffer");
}
I had thought that the output was optional for the Node API usage like in the CLI.
I kept getting the message "Error: undefined is required when passing image as buffer". There's a check for the output file name if the input is a buffer.
I think this should be replaced
with this