#5 How to choose input format for creating cmsHTransform ??

closed
nobody
None
5
2013-01-08
2013-01-08
Anonymous
No

Hi
I am trying to create cmsHTransform usng lcms 2.4. I am able to create the tranformation and apply it as well for few icc profiles. But the output result is not as expected. This may be because of incorrect input/output format passed by us for creating cmsHTransform. We didn't find any specific method to choose these formats for the given icc profiles.

For Example :

hInProfile = cmsOpenProfileFromFile("AdobeRGB1998.icc", "r");
hOutProfile = cmsOpenProfileFromFile("AppleRGB.icc", "r");

hTransform = cmsCreateTransform(hInProfile,
TYPE_BGR_8,
hOutProfile,
TYPE_BGR_8,
INTENT_RELATIVE_COLORIMETRIC,
cmsFLAGS_NOOPTIMIZE);

In this case hTransform was created but the output was not as expected.

Please help us on how to choose correct input/output formats for any icc profile.

Another issue is that no matter what output profile is specified, the output image is always of sRGB profile. Please help.

Discussion

  • Marti Maria Saguer

    Hi,
    If you mean the "TYPE_BGR_8", selecting this is not up to the profile, but up to you. It depends on the image data organization that you are going to pass to the transform.
    Assuming you are going to apply the transform to an image... how is encoded this image? : so This is the input format. And how do you want to encode the result? this is the output format.

    I would recommend to read the tutorial, all that is explained in detail.

    Regarding the sRGB issue, check your code, the CMM does not embed any profile.

    Finally, be careful with the cmsFLAGS_NOOPTIMIZE, as this is a performance killer. Don't use it unless really needed.

    Regards
    Marti

     
  • Marti Maria Saguer

    • status: open --> closed