CCITT FAX Encoding: Support FillOrder Reversed

This commit is contained in:
Schmidor
2015-07-04 00:42:09 +02:00
parent 62862d835a
commit 1e6227bee5
2 changed files with 20 additions and 2 deletions
@@ -179,6 +179,17 @@ public class CCITTFaxDecoderStreamTest {
assertArrayEquals(imageData, bytes);
}
@Test
public void testDecodeType3_2D_REVERSED() throws IOException {
InputStream stream = new CCITTFaxDecoderStream(new ByteArrayInputStream(DATA_G3_2D_lsb2msb), 6,
TIFFExtension.COMPRESSION_CCITT_T4, 2, TIFFExtension.GROUP3OPT_2DENCODING);
byte[] imageData = ((DataBufferByte) image.getData().getDataBuffer()).getData();
byte[] bytes = new byte[imageData.length];
new DataInputStream(stream).readFully(bytes);
assertArrayEquals(imageData, bytes);
}
@Test
public void testDecodeType4() throws IOException {
InputStream stream = new CCITTFaxDecoderStream(new ByteArrayInputStream(DATA_G4), 6,