Hi, > My question (Does lcms2 support a 'restricted ICC Profile'?) included > another question: > If yes: how? > > Tracing gimp-2.7, I found: > > The 'restricted ICC Profile', embedded in the file, is the > src_profile, the in_profile. > > With cmsCreate_sRGBProfile() the dst_profile, the out_profile, is generated. > > But this is only possible for the following two files: > > file5.jp2: color-space(RGB ) profile-connection-space(XYZ ) > Restricted ICC profile describing ROMM-RGB > > file7.jp2: color-space(RGB ) profile-connection-space(XYZ ) > 16-bit e-sRGB JP2 restricted (to sRGB) profile) > > But not for this file: > > file8.jp2: color-space(GRAY) profile-connection-space(XYZ ) > Restricted ICC profile describing greyscale version of ROMM-RGB > > Because no cmsCreate_GrayProfile() exist.
If I follow correctly your reasoning, I have good news: You are actually wrong :-) You are assuming that to do a color transform, both input and output profiles have to be of same colorspace, but that's not true. And this is one of the most powerful features of lcms and the color engines in general, you can connect profiles operating in different color spaces and you get automatic and accurate conversion between colorspaces. In you example, you can use sRGB as output and RGB as input, but you can also use gray or even CMYK for input, it is up to the CMM to do the conversion. This actually may simplify your code. Just use an profile for your monitor (or sRGB if you don't know) and use the embedded simplified profile, no matter which colorspace. The color engine will do the conversion for you. Incidentally, there is indeed a cmsCreate_GrayProfile(), it is called cmsCreateGrayProfile(), please take a look to the documentation. Hope this helps Marti ------------------------------------------------------------------------------ _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user