Relates :
|
|
Relates :
|
|
Relates :
|
I am getting the IIOMetadata object from the JPEG Writer by calling writer.getStreamMetadata(writeParam). This metadata claims to support Native as well as standard metadata formats. I am getting the Node object from this metadata by calling getAsTree(native format name) and trying to merge this node with the same metadata tree. The following exception is thrown by mergeTree(): java.lang.NullPointerException at com.sun.imageio.plugins.jpeg.MarkerSegment.getAttributeValue(MarkerSegment.java:131) at com.sun.imageio.plugins.jpeg.JFIFMarkerSegment.updateFromNativeNode(JFIFMarkerSegment.java:240) at com.sun.imageio.plugins.jpeg.JFIFMarkerSegment.<init>(JFIFMarkerSegment.java:133) at com.sun.imageio.plugins.jpeg.JPEGMetadata.mergeJFIFsubtree(JPEGMetadata.java:1113) at com.sun.imageio.plugins.jpeg.JPEGMetadata.mergeNativeTree(JPEGMetadata.java:1091) at com.sun.imageio.plugins.jpeg.JPEGMetadata.mergeTree(JPEGMetadata.java:1061) at WriterStreamMetadataTest.<init>(WriterStreamMetadataTest.java:68) at WriterStreamMetadataTest.main(WriterStreamMetadataTest.java:134) This is reproducible on all platforms since JDK1.4. I have attached a sample test. Execute it as follows: java WriterStreamMetadataTest <format> [merge] If 'merge' is specified, you would see the above exception for JPEG format. If 'merge' is not specified, the test would still fail reproducing a different bug: 4894894
|