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

IndexColorModel#getDataElements returns black no matter the input

XMLWordPrintable

    • 2d
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      A `IndexColorModel` that does not support alpha will return black (or the color closest to black) every time when calling `IndexColorModel#getDataElements(int[], int, Object)`. This seems to be caused by an erroneous bitwise-and instead of a bitwise-or used to set the alpha component to 0xFF when the color model does not support alpha (see https://github.com/openjdk/jdk/blob/8feabc849ba2f617c8c6dbb2ec5074297beb6437/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java#L1287).


      FREQUENCY : always


            jdv Jayathirth D V
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: