1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Use Uint8ClampedArray when returning image data in src/core/jbig2.js and src/core/jpg.js

This commit is contained in:
Jonas Jenwald 2017-08-15 16:06:55 +02:00
parent 74ad90cb8f
commit f6636d6b19
3 changed files with 3 additions and 3 deletions

View file

@ -991,7 +991,7 @@ var JpxStream = (function JpxStreamClosure() {
if (tileCount === 1) {
this.buffer = jpxImage.tiles[0].items;
} else {
var data = new Uint8Array(width * height * componentsCount);
var data = new Uint8ClampedArray(width * height * componentsCount);
for (var k = 0; k < tileCount; k++) {
var tileComponents = jpxImage.tiles[k];