[OpenJDK 2D-Dev] OpenJDK and lcms color management (soft-proofing)

Andrew Haley aph at redhat.com
Thu Jul 12 13:16:31 UTC 2012

On 07/12/2012 01:59 PM, Claudio Wilmanns wrote:

> If I understand you right, JNI gives me access to the Kodak CMM¹s C
> interface. OK, that¹s interesting. But I assume that there is some
> overhead involved in converting a Java image buffer to a format the CMM
> interface understands. Anyway, I found the Kodak CMM API here
> http://docs.oracle.com/cd/E19695-01/802-2012/802-2012.pdf, is this the
> correct document for use with JNI?

I don't know anything about the Kodak CMM.  LCMS is free software, and all
the code needed to interact with it is part of OpenJDK.

> Could be a little more specific what you are suggesting in your second
> paragraph? I guess I understand what you mean, but I¹d like to know the
> steps that are neccessary to do to achieve the goal.
> Let¹s say I have a source RGB image in AdobeRGB colorspace and want to
> convert it to a CMYK colorspace, then do a softproof from that CMYK
> colorspace to the display colorspace, that is represented by a custom ICC
> profile.

Oh dear, I warn you : I did say that it was a kludge.

You know the whitepoints of your source space and your target space:
they're in the colour profiles.  Create a matrix that is the inverse
of the transform from source to target whitepoint and apply it to your
source image.  Then do your relative output transform.  The transform
you just did is the inverse of the whitepoint transform that relative
colorimetic rendering does: it'll cancel.  If you have tools to create
colour profiles, you can create a profile that does exactly this
transform, and LCMS would then do exactly what you want.

But if this is all like Greek to you I'm afraid I can't help.  And I
cannot vouch for the quality of the reults of any such procedure -- it
would lose some accuracy, for sure.  And it'll be inconvenient.


More information about the 2d-dev mailing list