How to use @rgba-image/lanczos - 1 common examples

To help you get started, we’ve selected a few @rgba-image/lanczos examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vladimiry / ElectronMail / src / electron-main / api / endpoints-builders / tray-icon / lib.ts View on Github external
? 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;

@rgba-image/lanczos

Resize an ImageData using Lanczos resampling

MIT
Latest version published 3 years ago

Package Health Score

47 / 100
Full package analysis

Popular @rgba-image/lanczos functions

Similar packages