diff options
Diffstat (limited to 'lib/psd.js')
-rw-r--r-- | lib/psd.js | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1588,6 +1588,27 @@ var jspack = new JSPack(); ; 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 = []; |