Results 1 to 1 of 1
  1. #1
    Master468 is offline Member
    Join Date
    Aug 2014
    Posts
    1
    Rep Power
    0

    Default Bug in java.awt.ICC_ColorSpace?

    I'm trying to convert a device-dependent RGB value to the PCS (XYZ in this case) and back to device-dependent RGB. Relative colorimetric intent. When performing a round-trip (RGB-XYZ-RGB) with the same profile (for example sRGB) significant deviations occur between input and output RGB in the shadows. That makes the method useless.

    For example:

    Java Code:
    ICC_ColorSpace sRGB = new ICC_ColorSpace(ICC_Profile.getInstance(ICC_ColorSpace.CS_sRGB));
    float[] color = new float[] {0.1f, 0.1f, 0.1f}; //10% input stimulus [0...1]
    float[] transformedColor = sRGB.toCIEXYZ(color);
    System.out.println(transformedColor[0] + " " + transformedColor[1] + " " + transformedColor[2]);
    color = sRGB.fromCIEXYZ(transformedColor);
    System.out.println(color[0] + " " + color[1] + " " + color[2]);
    leads (rounded) to 0.045/ 0.044/ 0.041 - the input value was 0.1/ 0.1/ 0.1 (see above).

    Choosing a brighter color, for example 0.3/ 0.3/ 0.3 will lead to a sufficient precision. Anything I have missed? The Kodak implementation is quite old (1997) - so I would expect that such an enormous deviation would have been noticed and corrected since then.
    Last edited by Master468; 08-17-2014 at 01:04 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •