mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
Verify that RGB data is correct.
(cherry picked from commit 6ffcb88872fcc146d246635c060bbd1f30fd01ab)
This commit is contained in:
parent
2511b2d0cd
commit
3e2f54ee7c
@ -162,6 +162,13 @@ public class JPEGImageWriterTest extends ImageWriterAbstractTest<JPEGImageWriter
|
||||
reader.setInput(new ByteArrayImageInputStream(stream.toByteArray()));
|
||||
BufferedImage image = reader.read(0);
|
||||
assertNotNull(image);
|
||||
|
||||
// Test color space type RGB (encoded as YCbCr) in standard metadata
|
||||
IIOMetadata metadata = reader.getImageMetadata(0);
|
||||
IIOMetadataNode standard = (IIOMetadataNode) metadata.getAsTree(IIOMetadataFormatImpl.standardMetadataFormatName);
|
||||
NodeList colorSpaceType = standard.getElementsByTagName("ColorSpaceType");
|
||||
assertEquals(1, colorSpaceType.getLength());
|
||||
assertEquals("YCbCr", ((IIOMetadataNode) colorSpaceType.item(0)).getAttribute("name"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user