How to use the pngjs/browser.PNG function in pngjs

To help you get started, we’ve selected a few pngjs 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 tidys / CocosCreatorPlugins / packages / psd-convert-to-node / OnionRing.js View on Github external
SetPixels(data) {
        this.png.data = Buffer.from(data);
        this.png.height = this.height;
        this.png.width = this.width;
        let buffer = PNGBrowser.PNG.sync.write(this.png);
        fs.writeFileSync(this.fullpath, buffer);
    }

pngjs

PNG encoder/decoder in pure JS, supporting any bit size & interlace, async & sync with full test suite.

MIT
Latest version published 1 year ago

Package Health Score

70 / 100
Full package analysis