Browse Source

Nest JBIG2 prediction if statements together

ltp can only become truthy if predition is true.
p01 11 years ago
parent
commit
2a9fe573c0
  1. 4
      src/core/jbig2.js

4
src/core/jbig2.js

@ -269,11 +269,11 @@ var Jbig2Image = (function Jbig2ImageClosure() {
if (prediction) { if (prediction) {
var sltp = decoder.readBit(contexts, pseudoPixelContext); var sltp = decoder.readBit(contexts, pseudoPixelContext);
ltp ^= sltp; ltp ^= sltp;
}
if (ltp) { if (ltp) {
bitmap.push(bitmap[bitmap.length - 1]); // duplicate previous row bitmap[i] = row;//bitmap[i - 1]); // duplicate previous row
continue; continue;
} }
}
var row = new Uint8Array(width); var row = new Uint8Array(width);
bitmap.push(row); bitmap.push(row);
for (j = 0; j < width; j++) { for (j = 0; j < width; j++) {

Loading…
Cancel
Save