Hi,

I'm trying to access the gamma tables from ICC profile tags. Unfortunately the 
documentation is a bit spotty on the subject of gamma tables. E. g. these four 
functions are mentioned in LCMSAPI.TXT, but they're not described:

LPGAMMATABLE
cmsReadICCGamma(cmsHPROFILE hProfile, icTagSignature sig);

LPGAMMATABLE
cmsReadICCGammaReversed(cmsHPROFILE hProfile, icTagSignature sig);

int
cmsReadICCText(cmsHPROFILE hProfile, icTagSignature sig, char *Text);

int
cmsReadICCTextEx(cmsHPROFILE hProfile, icTagSignature sig, char *Text,
                 size_t size);


I'm just assuming that cmsReadICCGamma() retrieves a gamma table from an ICC 
profile tag, and cmsReadICCGammaReversed() does the same, but reverses it 
(using cmsReverseGamma()). Is that correct?

I've got no idea what the other two are doing.

What also is not clear to me is this: How do I get access to the pre- and 
post-linearisation tables (L1 and L2) from an AToBx/BToAx tag? I presume these 
are handled as gamma tables, but I could not find any documentation or 
anything sensible to identify the specific tables to access them. Of course I 
can get the LPLUT reference using  cmsReadICCLut(), and then access the L1 and 
L2 attributes of it directly. But the way the information is encoded in them 
is not really unambiguously comprehensible to me. L1/L2 are arrays of 16 
LPWORDs. Am I correct that the tag may contain 16 of these tables at the max, 
and I can find the linearisation table for channel n by accessing element 
[n-1] of that attribute? Does each of these L1 tables contain InputEntries 
elements and each of the L2 tables contain OutputEntries elements?

Furthermore this function below is in lcms.h, and it is also used in the 
sample codes. From that the behaviour is quite clear, but it is not even 
mentioned in the API documentation:

LPGAMMATABLE
cmsJoinGammaEx(LPGAMMATABLE, LPGAMMATABLE, c_int);

I know that the whole concept of gamma tables is to be revised in the 2.0 
version (I believe they were basically to be renamed to "tone curves" or so). 
But still I'd like to know how I need to approach things for now in an LCMS 
1.x environment.

Curiously,

Guy


-- 
Guy K. Kloss
Institute of Information and Mathematical Sciences
Te Kura Pūtaiao o Mōhiohio me Pāngarau
Massey University, Albany (North Shore City, Auckland)
473 State Highway 17, Gate 1, Mailroom, Quad B Building
voice: +64 9 414-0800 ext. 9585   fax: +64 9 441-8181
g.kl...@massey.ac.nz http://www.massey.ac.nz/~gkloss

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to