|
} else if (is.typedArray(input)) { |
|
if (input.length === 0) { |
|
throw Error('Input Bit Array is empty'); |
|
} |
|
inputDescriptor.buffer = Buffer.from(input.buffer); |
i think L42 should be like below to handle typedArray with byteOffset.
inputDescriptor.buffer = Buffer.from(input.buffer, input.byteOffset, input.byteLength);
using byteOffset seems unusal case but it will be nice to handle it.
sharp/lib/input.js
Lines 38 to 42 in b609df4
i think L42 should be like below to handle typedArray with byteOffset.
using byteOffset seems unusal case but it will be nice to handle it.