Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
? async (source) => {
const sourceBits = source.data.byteLength / (source.width * source.height);
const dest = {
data: Uint8ClampedArray.from(new Array(darwinSize.width * darwinSize.height * sourceBits)),
...darwinSize,
};
lanczos(
{
data: Uint8ClampedArray.from(source.data),
width: source.width,
height: source.height,
},
dest,
);
const result = make(dest.width, dest.height);
result.data = Buffer.from(dest.data);
return result;
}
: async (source) => source;