I'm hoping that someone here can help me out. I'm using v1.17 of lcms (can't
switch to v2 yet but that is on the schedule...) and have been exceptionally
happy with it.

My latest task is to add a tonal adjustment to my image after it has been
processed by LittleCMS. It seems to me that the most efficient way to do
this is to modify the B2A* tables in the ICC profile and combine my tonal
adjustment with the ICC profile's tonal adjustment.

So I've been reading, and rereading Section 13 of the manual and it seems
possible. I need to call cmsReadICCLut passing it icSigBToA0Tag (or 1 or 2
depending upon which rendering intent I want to modify) and that gives me
the ICC profile's LUT.

I also need to call cmsAllocLUT() to get a new lut but I'm confused about
how to call cmsSample3DGrid/_cmsSAMPLER to fill my new lut with my data. The
example shows an inverter callback, I'll have a small number of points, less
than a dozen, say (0,0), (25,30), (75,85), (100,100). It isn't clear to me
how often the callback is called. Do I just, say in my example write it like
this:

int ToneSampler(register WORD In[], register WORD Out[], register LPVOID
Cargo)
{
  Out[0] = In[0];
  Out[30] = In[25];
  Out[80] = In[75];
  Out[100] = In[100];
  return TRUE;
}

This seems *really, really, wrong*. I can see how you would algorithmically
write one (the InvertSampler example) but I don't see how to do that when
you only have actual sampled data.

Then I need to combine my two luts. I see this great function,
cmsJoinGamma(LPGAMMATABLE but that works on Gamma Tables, which are like
LUTs but not exactly).

And I'd like to smooth my LUT before combining it, using
cmsSmoothGamma(LPGAMMATABLE but that also works on Gamma Tables, not LUTs.

So, I think that the pieces are all there but I'm both not sure of that nor
am I sure how to put them all together. I appreciate any advice. Thank you.
------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to