> --- Ursprüngliche Nachricht --- > It would be useful to have an easy way to convert color adjustments to > an abstract-profile or an devicelink-profile, which could applied in > every application, which uses lcms or argyllcms.
Indeed (actually abstract or device link profiles aren't not even limited to argyll or lcms applications, but are even more general). > Concerning devicelink-profiles i have following questions to marti, > graeme or other CMM-developers: > > Is there code available, which can convert an ASCII file to a > devicelinkprofile ? If the application can supply a C funtion which carries out the transformation, then the LCMS library provides easy to use interfaces to sample this transformation at regular intervals in order to create a CLUT, and a device link profile. E.g. if I perform a color transformation in an image editor, then it needs to apply the transformation to each image pixel anyway, so it should not be a big problem to alter the editor, such that it also applies the same transformation to each CLUT grid point being sampled, in order to record the transformation in a profile. If you want to use a CGATS file as mentioned below as input, and if the RGB_in values happen to be arranged on a regular grid (e.g. 45*45*45 points), then it should not be a big problem to read the file and to turn it into a CLUT and a device link profile either, similar to the above case. Things become more complicated, if the RGB_in values in the CGATS file are scattered data, i.e. if they are arbitrary values. Since the CLUT is a regular grid, it is first necessary to fit a curve to the scattered data and then to resample this curve at regular intervals to create the CLUT. LCMS currently does not provide such a functionality. Argyll is a profiler and thus basically does contain all the necessary building blocks (e.g. scattered data fitting with smoothing splines, etc.), but of course someone needs to write the necessary glue to put all the building blocks together (this more complex, than resampling C coded color transformation with LCMS). Other issues to consider: For linear (i.e. gamma 1.0) RGB_in or RGB_out color spaces, CLUTs and device links may have an accuracy problem, particularly in dark areas. So it may be necessary to use pre/post linearization tables in the profile, which turn the linear RGB to non-linear RGB (on the input side), or vice versa (if linear RGB appears on the output side), such that the CLUT operates on non-linear RGB. If the original transformation can be sampled with e.g. a 45*45*45 grid (-> 91125 points), then the accuracy should be pretty reasonable (with the exception given above). However, if the transformation is specified by a set of scattered data (and maybe only a few hunded points), then the achievable accuracy may vary significantly, depending of the chosen set of data points (i.e. the chosen RGB_in values in the CGATS file). For optimal results, the RGB_in values need to be be distributed among the whole device gamut, there should be a higher spatial density of points in highly curved areas of the transformation, strongly curved transformations require generally a larger number of points, etc. etc. However, the choice of data points already need to be considered by the generator of the CGATS file, a poor choice cannot be compensated by the profiler. Furthermore, a CLUT cannot represent transformation very well, which involve abrupt bending (expcept if the bending point accidentally falls onto a grid point), but it will usually smooth such transformations. Regards, Gerhard > The ASCII-File represents the of input- an output-colorvalues, which > should linked together in a CGATS / ISO style like e.g. > > >> > IS12642 > ORIGINATOR "My application" > DESCRIPTOR "Enhance-Saturation" > CREATED "2005-06-10" > > KEYWORD CONTROL > > NUMBER_OF_FIELDS 7 > > BEGIN_DATA_FORMAT > SAMPLE_ID RGBin_R RGBin_G RGBin_B RGBout_R > RGBout_G RGBout_B > > END_DATA_FORMAT > > NUMBER_OF_SETS 729 > > BEGIN_DATA > > 1 0 0 0 0 0 0 > 2 7 0 0 2 3 8 > 3 15 0 0 4 7 17 > .... > > END_DATA > << > > > The resulting workflow should be like: > A tool for coloradjustment transforms a standard-set of > ASCII-colorvalues and produces such an ASCII-File, wich represents the > original and the adjusted colorvalues. > In the next step, this ASCII-file is internally transformed to an > devicelink-profile. The user has now the possibility to store the > coloradjustment as devicelink-profile. > This would make it possible to build in every dialogue for > coloradjustment a menue "save as devicelink-profile" > > The next step would be "recorder for for coloradjustments" > This would be an image wich contains pixel-representations of the > devicecolorvalues in the ASCII-file. > The colors of this image can be adjusted with every tool you want after > each other. > You could also first transform the image with an ICC-transformation and > then add some coloradjustments. > > At the end, the pixelvalues are converted to ASCII-values and put > together with the original ASCII-values to an ASCII-file for > devicelink-creation. > > This would make it possible to save very complex coloradjustments into > one devicelink-profile. Or a complete ICC-transformation can be > finetuned with the normal tools for coloradjsutments from the imaging > application. > > My question: > - Is there code for converting ASCII to a devicelink-profile ? > - Is there code for converting imagepixel to ASCII ? > - can we integrate this in lcms ? > > greetings from the colorspace > :-) Jan-Peter > > -- > > homann colormanagement ------ fon/fax +49 30 611 075 18 > Jan-Peter Homann ------------- mobile +49 171 54 70 358 > Kastanienallee 71 ------- http://www.colormanagement.de > 10435 Berlin --------- mailto:[EMAIL PROTECTED] > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Lcms-user mailing list > Lcms-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/lcms-user > -- Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis ++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++ ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user