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

FloatDoubleColorModel.getBlue returns different value between jdk 1.2 & 1.3

XMLWordPrintable

    • 2d
    • kestrel
    • generic
    • generic


      FloatDoubleColorModel.getBlue(new float[]{0.1f, 0.2f, 0.3f, 0.4f}) returns
      101 when jdk-1.3 is used and returns 102 when jdk-1.2 is used.

      This bug affects the JAI JCK test cases below:

      FloatDoubleColorModel_GetBlue_O_8 9
      FloatDoubleColorModel_GetBlue_O_8 10
      FloatDoubleColorModel_GetBlue_O_8 15
      FloatDoubleColorModel_GetBlue_O_8 16
      FloatDoubleColorModel_GetGreen_O_15 9
      FloatDoubleColorModel_GetGreen_O_15 10
      FloatDoubleColorModel_GetGreen_O_15 15
      FloatDoubleColorModel_GetGreen_O_15 16

      The program below demonstrates this behaviour.

      import java.awt.image.DataBuffer;
      import java.awt.Transparency;
      import java.awt.color.ColorSpace;
      import javax.media.jai.FloatDoubleColorModel;

      public class Bug_GetBlue_O_8 {
        public static void main(String args[]) {
          FloatDoubleColorModel fdcm =
            new FloatDoubleColorModel(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ),
              true, true, Transparency.TRANSLUCENT, DataBuffer.TYPE_FLOAT);
          System.out.println(fdcm.getBlue(new float[]{0.1f, 0.2f, 0.3f, 0.4f}));
        }
      }

            jrevans Jerald Evans (Inactive)
            chialin Chianphon Lin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: