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

PNG decoder dos not handle indexed images with less than 8 bits per pixel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.1_01
    • client-libs
    • None
    • 2d
    • generic
    • generic

      PNG images with 4 and 2 bits per pixel with PLTE chunk are rendered incorrectly. In the attached example two images are created from the bytearray using ImageIcon, exactly the same effect can be seen when they are created using

      Toolkit.getDefaultToolkit().createImage(data, off, length);

      Original images attached too. duke-new.png has 4 bits per pixel, duke-new3.png has 8. When opened in any graphics editors or in the vrowser they can be seen correctly.

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: