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
f5a5bd8c
Commit
f5a5bd8c
authored
Jul 21, 2014
by
Ryan LeFevre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RGB shim no longer required
parent
5eda9ee0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
670 additions
and
552 deletions
+670
-552
Cakefile
Cakefile
+1
-2
psd.js
dist/psd.js
+669
-530
rgb.coffee
shims/rgb.coffee
+0
-20
No files found.
Cakefile
View file @
f5a5bd8c
...
...
@@ -9,10 +9,9 @@ task 'compile', 'Compile with browserify for the web', ->
.
transform
(
'coffeeify'
)
.
require
(
'./shims/png.coffee'
,
expose
:
'./image_exports/png.coffee'
)
.
require
(
'./shims/init.coffee'
,
expose
:
'./psd/init.coffee'
)
.
require
(
'./shims/rgb.coffee'
,
expose
:
'./image_modes/rgb.coffee'
)
.
require
(
'./lib/psd.coffee'
,
expose
:
'psd'
)
.
bundle
(
err
,
src
)
->
return
console
.
log
(
err
)
if
err
?
fs
.
writeFile
'./dist/psd.js'
,
src
,
->
fs
.
stat
'./dist/psd.js'
,
(
err
,
stats
)
->
console
.
log
"Compiled to ./dist/psd.js -
#{
Math
.
round
(
stats
.
size
/
1024
)
}
KB"
\ No newline at end of file
console
.
log
"Compiled to ./dist/psd.js -
#{
Math
.
round
(
stats
.
size
/
1024
)
}
KB"
dist/psd.js
View file @
f5a5bd8c
This diff is collapsed.
Click to expand it.
shims/rgb.coffee
deleted
100644 → 0
View file @
5eda9ee0
module
.
exports
=
combineRgbChannel
:
->
rgbChannels
=
@
channelsInfo
.
map
(
ch
)
->
ch
.
id
.
filter
(
ch
)
->
ch
>=
-
1
for
i
in
[
0
...
@
numPixels
]
r
=
g
=
b
=
0
a
=
255
for
chan
,
index
in
rgbChannels
val
=
@
channelData
[
i
+
(
@
channelLength
*
index
)]
switch
chan
when
-
1
then
a
=
val
when
0
then
r
=
val
when
1
then
g
=
val
when
2
then
b
=
val
@
pixelData
.
push
r
,
g
,
b
,
a
\ 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