aboutsummaryrefslogtreecommitdiffstats
path: root/lib/psd.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/psd.min.js')
-rw-r--r--lib/psd.min.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/psd.min.js b/lib/psd.min.js
index 650c6a1..dd1d37e 100644
--- a/lib/psd.min.js
+++ b/lib/psd.min.js
@@ -176,6 +176,8 @@ return _results;};PSDImage.prototype.combineCMYK16Channel=function(){var a,c,i,k
rgb=PSDColor.cmykToRGB(255-c,255-m,255-y,255-k);_results.push(this.pixelData.push(rgb.r,rgb.g,rgb.b,this.getAlphaValue(a)));}
return _results;};PSDImage.prototype.combineLAB8Channel=function(){var a,alpha,b,i,l,rgb,_i,_ref,_results;_results=[];for(i=_i=0,_ref=this.numPixels;0<=_ref?_i<_ref:_i>_ref;i=0<=_ref?++_i:--_i){if(this.getImageChannels()===4){alpha=this.channelData[i];l=this.channelData[i+this.channelLength];a=this.channelData[i+this.channelLength*2];b=this.channelData[i+this.channelLength*3];}else{alpha=255;l=this.channelData[i];a=this.channelData[i+this.channelLength];b=this.channelData[i+this.channelLength*2];}
rgb=PSDColor.labToRGB(l*100>>8,a-128,b-128);_results.push(this.pixelData.push(rgb.r,rgb.g,rgb.b,this.getAlphaValue(alpha)));}
+return _results;};PSDImage.prototype.combineLAB16Channel=function(){var a,alpha,b,i,l,rgb,_i,_ref,_results;_results=[];for(i=_i=0,_ref=this.numPixels;_i<_ref;i=_i+=2){if(this.getImageChannels()===4){alpha=this.channelData[i];l=this.channelData[i+this.channelLength];a=this.channelData[i+this.channelLength*2];b=this.channelData[i+this.channelLength*3];}else{alpha=255;l=this.channelData[i];a=this.channelData[i+this.channelLength];b=this.channelData[i+this.channelLength*2];}
+rgb=PSDColor.labToRGB(l*100>>8,a-128,b-128);_results.push(this.pixelData.push(rgb.r,rgb.g,rgb.b,this.getAlphaValue(alpha)));}
return _results;};PSDImage.prototype.combineMultiChannel8=function(){var c,i,k,m,rgb,y,_i,_ref,_results;_results=[];for(i=_i=0,_ref=this.numPixels;0<=_ref?_i<_ref:_i>_ref;i=0<=_ref?++_i:--_i){c=this.channelData[i];m=this.channelData[i+this.channelLength];y=this.channelData[i+this.channelLength*2];if(this.getImageChannels()===4){k=this.channelData[i+this.channelLength*3];}else{k=255;}
rgb=PSDColor.cmykToRGB(255-c,255-m,255-y,255-k);_results.push(this.pixelData.push(rgb.r,rgb.g,rgb.b,this.getAlphaValue(255)));}
return _results;};PSDImage.prototype.toCanvasPixels=function(){return this.pixelData;};PSDImage.prototype.toFile=function(filename,cb){var png;if(this.toCanvasPixels().length===0){return cb();}