src/main/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java [1011:1040]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void parse_cHRM_chunk(PNGChunk chunk) {
        // If an sRGB chunk exists, ignore cHRM chunks
        if (sRGBRenderingIntent != -1) {
            return;
        }

        chromaticity = new float[8];
        chromaticity[0] = chunk.getInt4(0) / 100000.0F;
        chromaticity[1] = chunk.getInt4(4) / 100000.0F;
        chromaticity[2] = chunk.getInt4(8) / 100000.0F;
        chromaticity[3] = chunk.getInt4(12) / 100000.0F;
        chromaticity[4] = chunk.getInt4(16) / 100000.0F;
        chromaticity[5] = chunk.getInt4(20) / 100000.0F;
        chromaticity[6] = chunk.getInt4(24) / 100000.0F;
        chromaticity[7] = chunk.getInt4(28) / 100000.0F;

        if (encodeParam != null) {
            encodeParam.setChromaticity(chromaticity);
        }
        if (emitProperties) {
            properties.put("white_point_x", chromaticity[0]);
            properties.put("white_point_y", chromaticity[1]);
            properties.put("red_x", chromaticity[2]);
            properties.put("red_y", chromaticity[3]);
            properties.put("green_x", chromaticity[4]);
            properties.put("green_y", chromaticity[5]);
            properties.put("blue_x", chromaticity[6]);
            properties.put("blue_y", chromaticity[7]);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java [1066:1095]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void parse_cHRM_chunk(PNGChunk chunk) {
        // If an sRGB chunk exists, ignore cHRM chunks
        if (sRGBRenderingIntent != -1) {
            return;
        }

        chromaticity = new float[8];
        chromaticity[0] = chunk.getInt4(0) / 100000.0F;
        chromaticity[1] = chunk.getInt4(4) / 100000.0F;
        chromaticity[2] = chunk.getInt4(8) / 100000.0F;
        chromaticity[3] = chunk.getInt4(12) / 100000.0F;
        chromaticity[4] = chunk.getInt4(16) / 100000.0F;
        chromaticity[5] = chunk.getInt4(20) / 100000.0F;
        chromaticity[6] = chunk.getInt4(24) / 100000.0F;
        chromaticity[7] = chunk.getInt4(28) / 100000.0F;

        if (encodeParam != null) {
            encodeParam.setChromaticity(chromaticity);
        }
        if (emitProperties) {
            properties.put("white_point_x", chromaticity[0]);
            properties.put("white_point_y", chromaticity[1]);
            properties.put("red_x", chromaticity[2]);
            properties.put("red_y", chromaticity[3]);
            properties.put("green_x", chromaticity[4]);
            properties.put("green_y", chromaticity[5]);
            properties.put("blue_x", chromaticity[6]);
            properties.put("blue_y", chromaticity[7]);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



