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
a3d17b37
Commit
a3d17b37
authored
Apr 12, 2014
by
Ryan LeFevre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fully parsed header
parent
75a95028
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
file.coffee
lib/psd/file.coffee
+6
-0
header.coffee
lib/psd/header.coffee
+11
-0
No files found.
lib/psd/file.coffee
View file @
a3d17b37
...
...
@@ -14,6 +14,12 @@ module.exports = class File
UShort
:
code
:
'>H'
length
:
2
Float
:
code
:
'>f'
length
:
4
Double
:
code
:
'>d'
length
:
8
for
own
format
,
info
of
FORMATS
then
do
(
format
,
info
)
=>
@
::
[
"read
#{
format
}
"
]
=
->
@
readf
(
info
.
code
,
info
.
length
)[
0
]
...
...
lib/psd/header.coffee
View file @
a3d17b37
...
...
@@ -15,4 +15,15 @@ module.exports = class Header
@
sig
=
@
file
.
readString
(
4
)
@
version
=
@
file
.
readUShort
()
@
file
.
seek
6
,
true
@
channels
=
@
file
.
readUShort
()
@
rows
=
@
file
.
readUInt
()
@
cols
=
@
file
.
readUInt
()
@
depth
=
@
file
.
readUShort
()
@
mode
=
@
file
.
readUShort
()
colorDataLen
=
@
file
.
readUInt
()
@
file
.
seek
colorDataLen
,
true
resolve
(
@
)
\ No newline at end of file
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