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
8458d991
Commit
8458d991
authored
Jul 21, 2014
by
Ryan LeFevre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test fixes
parent
f5a5bd8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
png.coffee
lib/psd/image_exports/png.coffee
+6
-5
out.png
test/fixtures/out.png
+0
-0
No files found.
lib/psd/image_exports/png.coffee
View file @
8458d991
...
@@ -7,13 +7,14 @@ module.exports =
...
@@ -7,13 +7,14 @@ module.exports =
new
RSVP
.
Promise
(
resolve
,
reject
)
=>
new
RSVP
.
Promise
(
resolve
,
reject
)
=>
png
=
new
PNG
(
filterType
:
4
,
width
:
@
width
(),
height
:
@
height
())
png
=
new
PNG
(
filterType
:
4
,
width
:
@
width
(),
height
:
@
height
())
png
.
data
[
i
]
=
p
for
p
,
i
in
@
pixelData
png
.
data
=
@
pixelData
resolve
(
png
)
resolve
(
png
)
saveAsPng
:
(
output
)
->
saveAsPng
:
(
output
)
->
new
RSVP
.
Promise
(
resolve
,
reject
)
=>
new
RSVP
.
Promise
(
resolve
,
reject
)
=>
@
toPng
()
@
toPng
().
then
(
image
)
->
.
then
(
image
)
->
image
image
.
pack
().
pipe
(
fs
.
createWriteStream
(
output
))
.
pack
()
resolve
()
.
on
(
'end'
,
resolve
)
.
pipe
(
fs
.
createWriteStream
(
output
))
test/fixtures/out.png
View replaced file @
f5a5bd8c
View file @
8458d991
12.5 KB
|
W:
|
H:
16.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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