Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
node_modules
index.html
output.png
.history
5,578 changes: 1,585 additions & 3,993 deletions dist/psd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/psd.js.map

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions dist/psd.min.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions lib/psd/layer_mask.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Layer = require './layer.coffee'
# The layer mask is the overarching data structure that describes both
# the layers/groups in the PSD document, and the global mask.
# This part of the document is ordered as such:
#
#
# * Layers
# * Layer images
# * Global Mask
#
#
# The file does not need to have a global mask. If there is none, then
# its length will be zero.
module.exports = class LayerMask
Expand Down Expand Up @@ -38,6 +38,10 @@ module.exports = class LayerMask
parseLayers: ->
layerInfoSize = Util.pad2 @file.readInt()

if layerInfoSize is 0 and (@header.depth is 16 or @header.depth is 32)
@file.pos = @file.pos + 12
layerInfoSize = Util.pad2 @file.readInt()

if layerInfoSize > 0
layerCount = @file.readShort()

Expand Down
Loading