Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
psd.js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
regiostart
psd.js
Commits
7b4d34c3
Commit
7b4d34c3
authored
May 10, 2014
by
Ryan LeFevre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix node PNG export
parent
8e965273
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
png.coffee
lib/psd/image_exports/png.coffee
+3
-5
No files found.
lib/psd/image_exports/png.coffee
View file @
7b4d34c3
...
@@ -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
)
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment