File: png.coffee
| Defined in: | lib/psd/image_exports |
Variables Summary
- module.exports =
-
{ toPng: function() { var png; png = new PNG({ filterType: 4, width: this.width(), height: this.height() }); png.data = this.pixelData; return png; }, saveAsPng: function(output) { return new RSVP.Promise((function(_this) { return function(resolve, reject) { return _this.toPng().pack().pipe(fs.createWriteStream(output)).on('finish', resolve); }; })(this)); } }