summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/psd.html4
-rw-r--r--lib/psd.js2
-rw-r--r--lib/psd.min.js2
-rwxr-xr-xsrc/psd.coffee4
4 files changed, 6 insertions, 6 deletions
diff --git a/docs/psd.html b/docs/psd.html
index 8e634eb..a5ce278 100644
--- a/docs/psd.html
+++ b/docs/psd.html
@@ -2,7 +2,7 @@
<span class="nv">Root = </span><span class="nx">exports</span>
<span class="nv">fs = </span><span class="nx">require</span> <span class="s1">&#39;fs&#39;</span>
<span class="k">else</span>
- <span class="nv">Root = </span><span class="nb">window</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>Create our class and add to global scope</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">Root.PSD = </span><span class="k">class</span> <span class="nx">PSD</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>Version number</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@VERSION = </span><span class="s2">&quot;0.4.0&quot;</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Enable/disable debugging console logs</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@DEBUG = </span><span class="kc">false</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <p>Loads a PSD from a file. If we're in node, then this loads the
+ <span class="nv">Root = </span><span class="nb">window</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>Create our class and add to global scope</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">Root.PSD = </span><span class="k">class</span> <span class="nx">PSD</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>Version number</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@VERSION = </span><span class="s2">&quot;0.4.1&quot;</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Enable/disable debugging console logs</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@DEBUG = </span><span class="kc">false</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <p>Loads a PSD from a file. If we're in node, then this loads the
file from the filesystem. If we're in the browser, then this assumes
it has been passed a File object (either from a file input element,
or from HTML5 drag &amp; drop).</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@fromFile: </span><span class="nf">(file, cb = -&gt;) -&gt;</span>
@@ -135,7 +135,7 @@ incorrectly in one of the resources, or the file is corrupt.</p> </t
<span class="nx">@image</span><span class="p">.</span><span class="nx">toImage</span><span class="p">()</span></pre></div> </td> </tr> <tr id="section-21"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-21">&#182;</a> </div> <p>Extracts all parsed data from this PSD in a clean JSON
format excluding file and image data.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">toJSON: </span><span class="o">-&gt;</span>
<span class="nx">@parseLayersMasks</span><span class="p">()</span> <span class="nx">unless</span> <span class="nx">@layerMask</span>
-
+
<span class="nv">sections = </span><span class="p">[</span>
<span class="s1">&#39;header&#39;</span>
<span class="s1">&#39;layerMask&#39;</span>
diff --git a/lib/psd.js b/lib/psd.js
index 7fd75ef..4856451 100644
--- a/lib/psd.js
+++ b/lib/psd.js
@@ -339,7 +339,7 @@ var jspack = new JSPack(); ;
PSD.name = 'PSD';
- PSD.VERSION = "0.4.0";
+ PSD.VERSION = "0.4.1";
PSD.DEBUG = false;
diff --git a/lib/psd.min.js b/lib/psd.min.js
index a3d3836..356f21e 100644
--- a/lib/psd.min.js
+++ b/lib/psd.min.js
@@ -71,7 +71,7 @@ return a;};m.Pack=function(fmt,values)
{sum+=(((m[1]==undefined)||(m[1]==''))?1:parseInt(m[1]))*this._lenLut[m[2]];}
return sum;};};var jspack=new JSPack();;var Log,PSD,PSDBrightnessContrast,PSDChannelImage,PSDColor,PSDColorBalance,PSDCurves,PSDDropDownLayerEffect,PSDFile,PSDHeader,PSDHueSaturation,PSDImage,PSDInvert,PSDLayer,PSDLayerEffect,PSDLayerEffectCommonStateInfo,PSDLayerMask,PSDLevels,PSDPosterize,PSDResource,PSDSelectiveColor,PSDThreshold,Root,Util,assert,fs,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};assert=(function(assert){if(typeof exports!=="undefined"&&exports!==null){return require('assert');}
assert=function(test){if(test!==true){throw"Assertion error";}};assert.equal=function(actual,expected){if(actual!==expected){throw"Assertion error";}};return assert;})(assert);if(typeof exports!=="undefined"&&exports!==null){Root=exports;fs=require('fs');}else{Root=window;}
-Root.PSD=PSD=(function(){PSD.name='PSD';PSD.VERSION="0.4.0";PSD.DEBUG=false;PSD.fromFile=function(file,cb){var data,reader;if(cb==null){cb=function(){};}
+Root.PSD=PSD=(function(){PSD.name='PSD';PSD.VERSION="0.4.1";PSD.DEBUG=false;PSD.fromFile=function(file,cb){var data,reader;if(cb==null){cb=function(){};}
if(typeof exports!=="undefined"&&exports!==null){data=fs.readFileSync(file);return new PSD(data);}else{reader=new FileReader();reader.onload=function(f){var bytes,psd;bytes=new Uint8Array(f.target.result);psd=new PSD(bytes);return cb(psd);};return reader.readAsArrayBuffer(file);}};PSD.fromURL=function(url,cb){var xhr;if(cb==null){cb=function(){};}
xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){var data,psd;data=new Uint8Array(xhr.response||xhr.mozResponseArrayBuffer);psd=new PSD(data);return cb(psd);};return xhr.send(null);};PSD.prototype.options={layerImages:false};function PSD(data){this.file=new PSDFile(data);this.header=null;this.resources=null;this.layerMask=null;this.layers=null;this.images=null;this.image=null;}
PSD.prototype.setOptions=function(options){var key,val,_results;_results=[];for(key in options){if(!__hasProp.call(options,key))continue;val=options[key];_results.push(this.options[key]=val);}
diff --git a/src/psd.coffee b/src/psd.coffee
index e2129d8..f2374e6 100755
--- a/src/psd.coffee
+++ b/src/psd.coffee
@@ -8,7 +8,7 @@ else
# Create our class and add to global scope
Root.PSD = class PSD
# Version number
- @VERSION = "0.4.0"
+ @VERSION = "0.4.1"
# Enable/disable debugging console logs
@DEBUG = false
@@ -191,7 +191,7 @@ Root.PSD = class PSD
# format excluding file and image data.
toJSON: ->
@parseLayersMasks() unless @layerMask
-
+
sections = [
'header'
'layerMask'