Jan-Peter Homann schrieb:
Hello Gerhard, Caspar and list.
So, it seems to be not so complicate to save a coloradjustment as
devicelink-profile or abstract profile.
For me, the ASCII-File was an exmple to illustrate, what I want.
An Array in C would be quite similar, as I understand.
The Array has no other function as to record the coloradjustment. So
it can be precalculated with regular set gridpoints.
A grid of 33*33*33 should be fine enough to record a color adjustment
in RGB-colorspace.
To go into deeper detail, the LCMS API is actually defined as follows:
________________________________________________
int cmsSample3DGrid(LPLUT Lut,
_cmsSAMPLER Sampler,
LPVOID Cargo, DWORD dwFlags);
________________________________________________
Builds the CLUT table by calling repeatly a supplied callback function
typedef int (* _cmsSAMPLER)(register WORD In[],
register WORD Out[],
register LPVOID Cargo);
The programmer has to write a callback function. This function
should calculate Out values given a In[] set. For example, if we
want a LUT to invert channels, a sampler could be:
int InvertSampler(register WORD In[],
register WORD Out[],
register LPVOID Cargo)
{
for (i=0; i < 3; i++)
Out[i] = ~ In[i];
return 0;
}
cmsSample3DGrid does call this function to build the CLUT.
Pre/post linearization tables may be taken into account across
flags parameter
[...]
Thus, in order to interface the application and LCMS optimally, the
application should provide the callback function, which performs the
particular, desired color transformation (for a single
color). cmsSample3DGrid() will call this function for every point of the
3D grid.
Regards,
Gerhard
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user