SourceForge has been redesigned. Learn more.
Close

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

closed
nobody
None
9
2013-01-10
2013-01-09
poortip
No

Hi,

I had posted this question earlier as an anonymous user, so I couldn't comment on the reply made by Marti..

*************************************************************************************************************************************************************************************
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.

*************************************************************************************************************************************************************************************

In that reply, it has been suggested that the tutorial explains the selection of input/output formats. My question still stands unanswered. How can we check the encoding of an image and choose the formats accordingly? The tutorial specifies several formats. For eg., how can we differentiate between TYPE_BGR_8 and TYPE_RGB_8?

I am looking to code a generalized function that will transform any kind of image passed to it. So, I need a method that can compute the input formats. Is there anything useful?

I am new to this. Please help.

Discussion

  • poortip

    poortip - 2013-01-09
    • priority: 5 --> 9
     
  • Marti Maria Saguer

    Hi,
    I still dont fully understand the question.
    You are supposed to provide a memory buffer with the pixels to be converted, How you do that, is completely up to you and out of lcms scope. I suggest you reading some book on imaging basics, or do a google search on the term "Pixel format"
    Regards
    Marti

     
  • Marti Maria Saguer

    • status: open --> closed