src/main/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java [1007:1073]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            properties.put("background_color", new Color(r, g, b));
        }
    }

    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]);
        }
    }

    private void parse_gAMA_chunk(PNGChunk chunk) {
        // If an sRGB chunk exists, ignore gAMA chunks
        if (sRGBRenderingIntent != -1) {
            return;
        }

        fileGamma = chunk.getInt4(0) / 100000.0F;

        float exp =
            performGammaCorrection ? displayExponent / userExponent : 1.0F;
        if (encodeParam != null) {
            encodeParam.setGamma(fileGamma * exp);
        }
        if (emitProperties) {
            properties.put("gamma", fileGamma * exp);
        }
    }

    private void parse_hIST_chunk(PNGChunk chunk) {
        if (redPalette == null) {
            String msg = PropertyUtil.getString("PNGImageDecoder18");
            throw new RuntimeException(msg);
        }

        int length = redPalette.length;
        int[] hist = new int[length];
        for (int i = 0; i < length; i++) {
            hist[i] = chunk.getInt2(2 * i);
        }

        if (encodeParam != null) {
            encodeParam.setPaletteHistogram(hist);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java [1062:1128]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            properties.put("background_color", new Color(r, g, b));
        }
    }

    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]);
        }
    }

    private void parse_gAMA_chunk(PNGChunk chunk) {
        // If an sRGB chunk exists, ignore gAMA chunks
        if (sRGBRenderingIntent != -1) {
            return;
        }

        fileGamma = chunk.getInt4(0) / 100000.0F;
        // System.out.println("Gamma: " + fileGamma);
        float exp =
            performGammaCorrection ? displayExponent / userExponent : 1.0F;
        if (encodeParam != null) {
            encodeParam.setGamma(fileGamma * exp);
        }
        if (emitProperties) {
            properties.put("gamma", fileGamma * exp);
        }
    }

    private void parse_hIST_chunk(PNGChunk chunk) {
        if (redPalette == null) {
            String msg = PropertyUtil.getString("PNGImageDecoder18");
            throw new RuntimeException(msg);
        }

        int length = redPalette.length;
        int[] hist = new int[length];
        for (int i = 0; i < length; i++) {
            hist[i] = chunk.getInt2(2 * i);
        }

        if (encodeParam != null) {
            encodeParam.setPaletteHistogram(hist);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



