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:
parent
74ad90cb8f
commit
f6636d6b19
3 changed files with 3 additions and 3 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue