[Pkg-javascript-commits] [pdf.js] 44/204: Fix handling of RGBA buffers in CalRGB colorspace (issue 5270)
David Prévot
taffit at moszumanska.debian.org
Sat Oct 25 18:50:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 007d7b2d9579fb8659604dd57ce4bef56cb8ee24
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Mon Sep 8 12:26:32 2014 +0200
Fix handling of RGBA buffers in CalRGB colorspace (issue 5270)
---
src/core/colorspace.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/core/colorspace.js b/src/core/colorspace.js
index 361b486..9381def 100644
--- a/src/core/colorspace.js
+++ b/src/core/colorspace.js
@@ -1080,20 +1080,21 @@ var CalRGBCS = (function CalRGBCSClosure() {
convertToRgb(this, src, srcOffset, dest, destOffset, 1);
},
getRgbBuffer: function CalRGBCS_getRgbBuffer(src, srcOffset, count,
- dest, destOffset, bits) {
+ dest, destOffset, bits,
+ alpha01) {
var scale = 1 / ((1 << bits) - 1);
for (var i = 0; i < count; ++i) {
convertToRgb(this, src, srcOffset, dest, destOffset, scale);
srcOffset += 3;
- destOffset += 3;
+ destOffset += 3 + alpha01;
}
},
- getOutputLength: function CalRGBCS_getOutputLength(inputLength) {
- return inputLength;
+ getOutputLength: function CalRGBCS_getOutputLength(inputLength, alpha01) {
+ return (inputLength * (3 + alpha01) / 3) | 0;
},
isPassthrough: ColorSpace.prototype.isPassthrough,
- createRgbBuffer: ColorSpace.prototype.createRgbBuffer,
+ fillRgb: ColorSpace.prototype.fillRgb,
isDefaultDecode: function CalRGBCS_isDefaultDecode(decodeMap) {
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list