findCompressionType always uses RLE if leading EOL is missing (#657)

Update of the last read byte is missing since the last update. So if only the first EOL is missing, further EOLs after the lines are not detected.
This commit is contained in:
Oliver Schmidtmer
2022-01-15 00:21:47 +01:00
committed by GitHub
parent 7e0d8922da
commit ac8a36db1c
2 changed files with 15 additions and 0 deletions
@@ -170,6 +170,7 @@ final class CCITTFaxDecoderStream extends FilterInputStream {
// no EOL before stream end
return TIFFBaseline.COMPRESSION_CCITT_MODIFIED_HUFFMAN_RLE;
}
streamByte = (byte) read;
}
b = (short) ((b << 1) + ((streamByte >> (7 - (i % 8))) & 0x01));