-
Bug
-
Resolution: Fixed
-
P2
-
1.3.0
-
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}));
}
}