Re: [Lcms-user] PDF ICCBased color space to RGB
An ICC-based CMM for color management
Brought to you by:
mm2
From: Derek B. N. <de...@gl...> - 2017-10-23 19:03:59
|
Hi Dmitry, The PDF stream associated with an ICCBased color space is an ICC profile. You can pass that data to cmsOpenProfileFromMem (or cmsOpenProfileFromFile, etc.). Then create an RGB profile, e.g., with cmsCreate_sRGBProfile. Then create a transform with cmsCreateTransform. And finally, call cmsDoTransform to convert colors from the PDF color space to RGB. The LittleCMS tutorial (http://www.littlecms.com/LittleCMS2.8%20tutorial.pdf) has more detailed info on this. That's probably a better place to start than the API Reference. - Derek On 2017 Oct 23, Dmitry Salychev wrote: > Hi, Little CMS users and developers. > > I just discovered the library and tried to find anything suitable about > converting color from one space to other in user manual. There are > functions like: > > cmsSetColorSpace() > cmsXYZ2Lab() > cmsLab2XYZ() > > and similar ones. I should create/load a profile, specify color space and > feed one of these functions with, say, values for 3 components in ICCBased > color space to receive a simple RGB values, shouldn't I? I'm talking about > ICCBased because it's defined in a PDF file as a stream of data. I can > extract it and decode, however, I have no clue how to process 3 color > components of this space into a simple RGB color using this data. > > May you point me to a specific page in the manual or describe any details > I'm missing? > Thanks. > > Little CMS user manual: http://www.littlecms.com/LittleCMS2.8%20API.pdf (p. > 51, p. 54) > PDF 1.7 reference: > https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf > (p. 252) > > Regards, > > - Dmitry |