1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Fix TypeError that occurs in colorspace.js on accidentally passing an 'Array' instead of 'TypedArray'

Fix TypeError that occurs in colorspace.js on accidentally passing an 'Array' instead of 'TypedArray'

Changed getRgbItem(...) to getRgbBuffer(...) since this.lookup has values in range[0, 255] whereas getRgbItem(...) expects those to be in range [0, 1]

Revert changes for IE9 compatibility
This commit is contained in:
Apoorv Mishra 2017-07-19 05:24:33 +05:30
parent 9f5c1550ed
commit d14956d4b8

View file

@ -538,7 +538,7 @@ var IndexedCS = (function IndexedCSClosure() {
dest, destOffset) {
var numComps = this.base.numComps;
var start = src[srcOffset] * numComps;
this.base.getRgbItem(this.lookup, start, dest, destOffset);
this.base.getRgbBuffer(this.lookup, start, 1, dest, destOffset, 8, 0);
},
getRgbBuffer: function IndexedCS_getRgbBuffer(src, srcOffset, count,
dest, destOffset, bits,