diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psd.js | 2 | ||||
-rw-r--r-- | lib/psd.min.js | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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);} |