|
|
@ -1787,6 +1787,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { |
|
|
|
this.inputBits = 0; |
|
|
|
this.inputBits = 0; |
|
|
|
this.inputBuf = 0; |
|
|
|
this.inputBuf = 0; |
|
|
|
this.outputBits = 0; |
|
|
|
this.outputBits = 0; |
|
|
|
|
|
|
|
this.rowsDone = false; |
|
|
|
|
|
|
|
|
|
|
|
var code1; |
|
|
|
var code1; |
|
|
|
while ((code1 = this.lookBits(12)) === 0) { |
|
|
|
while ((code1 = this.lookBits(12)) === 0) { |
|
|
@ -1872,6 +1873,9 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { |
|
|
|
var refPos, blackPixels, bits, i; |
|
|
|
var refPos, blackPixels, bits, i; |
|
|
|
|
|
|
|
|
|
|
|
if (this.outputBits === 0) { |
|
|
|
if (this.outputBits === 0) { |
|
|
|
|
|
|
|
if (this.rowsDone) { |
|
|
|
|
|
|
|
this.eof = true; |
|
|
|
|
|
|
|
} |
|
|
|
if (this.eof) { |
|
|
|
if (this.eof) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -2052,7 +2056,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.eoblock && this.row === this.rows - 1) { |
|
|
|
if (!this.eoblock && this.row === this.rows - 1) { |
|
|
|
this.eof = true; |
|
|
|
this.rowsDone = true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
code1 = this.lookBits(12); |
|
|
|
code1 = this.lookBits(12); |
|
|
|
if (this.eoline) { |
|
|
|
if (this.eoline) { |
|
|
@ -2074,7 +2078,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.eof && this.encoding > 0) { |
|
|
|
if (!this.eof && this.encoding > 0 && !this.rowsDone) { |
|
|
|
this.nextLine2D = !this.lookBits(1); |
|
|
|
this.nextLine2D = !this.lookBits(1); |
|
|
|
this.eatBits(1); |
|
|
|
this.eatBits(1); |
|
|
|
} |
|
|
|
} |
|
|
|