mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 03:55:28 -04:00
Test case for #446.
This commit is contained in:
parent
38ea0989d4
commit
a0955875d8
@ -610,6 +610,31 @@ public class TIFFImageReaderTest extends ImageReaderAbstractTest<TIFFImageReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testReadCMYKExtraSamples() throws IOException {
|
||||||
|
ImageReader reader = createReader();
|
||||||
|
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/tiff/cmyk-with-non-alpha-extra-channel.tiff"))) {
|
||||||
|
reader.setInput(stream);
|
||||||
|
|
||||||
|
ImageReadParam param = reader.getDefaultReadParam();
|
||||||
|
|
||||||
|
BufferedImage image = null;
|
||||||
|
try {
|
||||||
|
image = reader.read(0, param);
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
failBecause("Image could not be read", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
assertNotNull(image);
|
||||||
|
assertEquals(160, image.getWidth());
|
||||||
|
assertEquals(227, image.getHeight());
|
||||||
|
|
||||||
|
assertRGBEquals("Wrong RGB", 0xff1E769D, image.getRGB(0, 0), 4);
|
||||||
|
assertRGBEquals("Wrong RGB", 0xff1E769D, image.getRGB(159, 226), 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReadWithSubsampleParamPixelsJPEG() throws IOException {
|
public void testReadWithSubsampleParamPixelsJPEG() throws IOException {
|
||||||
// Tiled "new style" JPEG
|
// Tiled "new style" JPEG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user