mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 00:28:06 +02:00
Use Uint8ClampedArray
for the image data returned by JpegDecode
, in src/display/api.js
Since all the built-in PDF.js image decoders now return their data as `Uint8ClampedArray`, for consistency `JpegDecode` on the main-thread should be doing the same thing; follow-up to PR 8778.
This commit is contained in:
parent
47a9d38280
commit
dc6e1b4176
1 changed files with 1 additions and 1 deletions
|
@ -2028,7 +2028,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
var height = img.height;
|
||||
var size = width * height;
|
||||
var rgbaLength = size * 4;
|
||||
var buf = new Uint8Array(size * components);
|
||||
var buf = new Uint8ClampedArray(size * components);
|
||||
var tmpCanvas = document.createElement('canvas');
|
||||
tmpCanvas.width = width;
|
||||
tmpCanvas.height = height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue