mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-01 00:00:02 -04:00
CCITT FAX Encoding: Support FillOrder Reversed
This commit is contained in:
+11
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user