Commit 7b4d34c3 authored by Ryan LeFevre's avatar Ryan LeFevre

Fix node PNG export

parent 8e965273
...@@ -4,13 +4,11 @@ RSVP = require 'rsvp' ...@@ -4,13 +4,11 @@ RSVP = require 'rsvp'
module.exports = module.exports =
toPng: -> toPng: ->
return @png if @png
@png = new Png(new Buffer(@pixelData), @width(), @height(), 'rgba')
new RSVP.Promise (resolve, reject) => new RSVP.Promise (resolve, reject) =>
png = new Png(new Buffer(@pixelData), @width(), @height(), 'rgba')
console.log "Encoding!" console.log "Encoding!"
@png.encode(resolve) png.encode(resolve)
saveAsPng: (output) -> saveAsPng: (output) ->
new RSVP.Promise (resolve, reject) => new RSVP.Promise (resolve, reject) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment