Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6574555

PNGImageWriter incorrectly sets bKGD chunk

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 5.0, 8, 9, 10, 11
    • client-libs
    • b13
    • generic
    • generic

      FULL PRODUCT VERSION :
      java version "1.5.0_09"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      PNGImageWriter always sets the bKGD chunk as grayscale because it sets each channel as the value of the red channel. Here is the code segment:

      int chunkRed = metadata.bKGD_red;
      int chunkGreen = metadata.bKGD_red;
      int chunkBlue = metadata.bKGD_red;

      I made a copy of the classes used and changed these lines to set the colors properly and it behaved as expected.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            jdv Jayathirth D V
            bae Andrew Brygin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: