Fix for #455: Ignore profiles PhotometricInterpretation MinIsWhite with 1bit/pixel

This commit is contained in:
Oliver Schmidtmer
2018-11-22 12:20:58 +01:00
parent 5e3229c9b7
commit cbaa0dc688
3 changed files with 15 additions and 1 deletions
@@ -609,6 +609,20 @@ public class TIFFImageReaderTest extends ImageReaderAbstractTest<TIFFImageReader
assertEquals(0xf5, alphaRaster.getPixel(50, 50, alpha)[0]);
}
}
@Test
public void testMinIsWhiteWithProfile() throws IOException {
ImageReader reader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/tiff/ccitt/min-is-white-with-profile.tif"))) {
reader.setInput(stream);
BufferedImage image = reader.read(0);
assertNotNull(image);
assertEquals(0xFFFFFFFF, image.getRGB(0, 0));
assertEquals(0xFFFFFFFF, image.getRGB(50, 50));
}
}
@Test
public void testReadWithSubsampleParamPixelsJPEG() throws IOException {