2005.11.27 08:27 "Re: [Tiff] Settin ICC Profile info in a tiff file", by Joris Van Damme
How do you set the ICC profile information in a tiff file. Can u directly read in the binary data from a .icm file and then pass it in without changing it at all and the tiff library will set everything for you correctly. There are Two parameters when setting the ICC profile. The first is the size of the ICC profile data and the second is the actual ICC profile data. The second parameter usage is not well documented and i dont know how to use it any ideas?. Any sample code on how to read in the ICC profile and set the ICC profile information in the tiff file would be great. Thanx in advance
Please post plain text only. That, too, is a matter of efficient file format, bandwidth conservation, ability to efficiently post-process and archive the mail, ability to quote properly, etc etc. It *is* important, and us programmers should understand why.
The ICC tag contains an ICC profile. That is exactly the same thing as what you find in a .icc file. Don't know about .icm, seen the extension before, but I don't know if it's exactly the same as .icc. Aside from being able to read or write the value of the ICC tag, LibTiff does not care about the actual data. It cannot understand profiles, much less apply them. For that, you need an engine like LCMS.
Some pointers that may be useful:
ICC tag http://www.awaresystems.be/imaging/tiff/tifftags/iccprofile.html
ICC profile specification http://www.color.org/ICC1-V41.pdf
LCMS (free and open source color management system) http://www.littlecms.com/
>From your question, it seems that you're concerned with the actual .icc file format. This probably means you either need to scientifically exact specify the data in a TIFF, using the ICC tag, when writing, or that you need to apply the data in an ICC tag, when reading a TIFF.
For the first, there are a number of open source profile generators, and a number of open source profiles. It is common and very convinient, for example, to specify an sRGB profile in the ICC tag. Readers that ignore the ICC tag, are likely to interpret the data as sRGB or very similar. And readers who do apply the ICC tag, wil end up with exact color-scientifically correct XYZ, without making any assumptions. So this is a good deal for both.
It is much less common to build a profile for a single specific TIFF, per TIFF. That is because the work involved in building profiles is considerable, and because there's a redundant degree of freedom anyway.
For the second, there exist a utility inside the LCMS package that may be useful. If I'm not mistaking, it can convert a TIFF-with-ICC to a plain ICC-less TIFF in any of a number of color spaces...
In either of the above cases, I recommend you subscribe to the LCMS mailing list.
Joris Van Damme
Download your free TIFF tag viewer for windows here: