Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}