mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08: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
|
@ -955,7 +955,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
|||
onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) {
|
||||
this.currentPageInfo = info;
|
||||
var rowSize = (info.width + 7) >> 3;
|
||||
var buffer = new Uint8Array(rowSize * info.height);
|
||||
var buffer = new Uint8ClampedArray(rowSize * info.height);
|
||||
// The contents of ArrayBuffers are initialized to 0.
|
||||
// Fill the buffer with 0xFF only if info.defaultPixelValue is set
|
||||
if (info.defaultPixelValue) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue