src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java
Print this page
@@ -1252,12 +1252,15 @@
String name = node.getNodeName();
if (name.equals("IHDR")) {
IHDR_width = getIntAttribute(node, "width");
IHDR_height = getIntAttribute(node, "height");
- IHDR_bitDepth = getEnumeratedAttribute(node, "bitDepth",
- IHDR_bitDepths);
+ IHDR_bitDepth =
+ Integer.valueOf(IHDR_bitDepths[
+ getEnumeratedAttribute(node,
+ "bitDepth",
+ IHDR_bitDepths)]);
IHDR_colorType = getEnumeratedAttribute(node, "colorType",
IHDR_colorTypeNames);
IHDR_compressionMethod =
getEnumeratedAttribute(node, "compressionMethod",
IHDR_compressionMethodNames);