Re: What's in a profile?
Re: What's in a profile?
- Subject: Re: What's in a profile?
- From: Graeme Gill <email@hidden>
- Date: Mon, 24 Jul 2006 13:41:09 +1000
Lee Blevins wrote:
Is there a dummies guide to the structure of an icc profile?
As such things go, the ICC spec. is a pretty good standard document,
relatively clear and readable, with (now) a fair bit of introductory
and concept documentation at the front. It is ultimately technical
though, since it has to specify everything to the necessary detail.
It is the sort of thing that needs a couple of passes before
you start getting some comfort about the "lay of the land".
Something dumbed down so someone with my limited experience can
understand it.
Certainly one of the difficult aspects with any document is when
it assumes you know what they mean when they say "xyzzy", but
I'm not sure there's any solution to that, other than learning
what it means. The spec. does have a section defining a number
of terms and definitions.
I would imagine at some location in the file there is a table of input
colors and output colors. Am I right in this assumption or is it a
formula instead of a lookup table?
It's unclear what you're asking when you say "input and output colors".
The colorant channels are either implicit in the colorspace tag,
or may be listed in an optional colorant tag for less well define
spaces. For a device profile, one input or output is always the
PCS (Profile Connection Space).
I'd like to gain enough information that I could direct a file pointer
to locations in the file, read a defined number of bits/bytes and
interpret what's there.
I'd hardly call this something that would be easy given a "dummies guide".
The basic header and tag structure isn't that hard to figure out or
write code to interpret, but there is some variation on how each
tag is encoded, and to move on to the next level of orchestrating
the information contained in the tags to the point where you
can use the information to convert color values, is a little
bit of a step, and to be really useful, you need to have some
confidence that you're getting the right numbers out.
If you go looking, there are probably about half a dozen open source
libraries out there, written in various languages, that deal with
ICC files to one level or another. Most are written in C or C++,
but there may be others in other languages as well.
Most libraries take the very straightforward approach of
loading each tag into memory, and then letting the
caller interpret the tags with the aid of a few
support function to convert things like fixed point
numbers etc. Others (for instance, my icclib) do
a bit more work than this, and convert everything
into machine native format (ie. floating point
numbers).
How complex is the math used in moving one color to another color space
in one of the popular rendering intents? Are there examples of these
equations available outside of proprietary technology?
The basic maths is very straightforward - it's just linear interpolation,
so it doesn't involve much more than addition, multiplication and
division. The ICC spec. spells out most of the maths involved
in converting colors. Several of the packages I mention above
include CMM implementations. Three are
1) The sampleICC project at the ICC site <http://www.color.org/resource2.html>
2) Mari Maria's LittleCMS <http://www.littlecms.com/>
3) My icclib <http://www.argyllcms.com/icclibsrc.html>
It may be rather hard to find what you're looking for in such source
code though, because there ends up being a fair amount of
code involved in supporting the full functionality of the ICC
profile, and the level of internal documentation is usually low.
Graeme Gill.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Colorsync-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden