1ICC profile I/O library (icclib), README file
2
3Date 2002/4/22, Version 2.02
4
5This distribution contains source code which implements the reading and
6writing of color profile files that conform to the International Color
7Consortium (ICC) Profile Format Specification, Version 3.4.
8
9For more information about the ICC, and for copies of the specification,
10please refer to http://www.color.org/.
11
12(Note that this software is written from the ICC V3.4 standard, but the
13software and its author are not affiliated with, or otherwise connected
14with the ICC.)
15
16The ICC profile I/O library archive is kept at
17http://web.access.net.au/argyll/color.html
18
19(Version 2.02 is has a few minor changes and fixups from V2.00.
20See icc.c for a more detailed change history.)
21
22Motivation
23
24Color is still very much a black art to many programmers dealing with
25computer graphics. The ICC Profile Format is an industry attempt to provide
26an interchange format to help solve the problems of specifying color, and
27in transferring color graphics from, and between systems and devices.
28Although the ICC format has been around a number of years, and has long
29been adopted by companies in the business of providing systems for
30publishing and printing, and is now widely used as part of commercial
31operating system support for device independent color, its uptake in the
32general world of computer graphics has been slow.
33
34The writing of this library was prompted by my private and professional
35enthusiasm for computer graphics, and color. Inspired by other examples of
36freely usable software (notably the Independent JPEG Group's free JPEG
37software, and Sam Leffler's TIFF library), I have decided to make this
38library available under similar terms. I hope that this library will
39provide a starting point for including ICC profile support more widely that
40is currently the case, particularly in open source code projects.
41
42Overview
43
44This package contains a C software implementation of the ICC Profile
45Format, Version 3.4. The ICC Profile Format attempts to provide a
46cross-platform device profile format, that can be used to translate color
47data created on one device into another device's native color space. For a
48fuller explanation of what the ICC Profile Format is all about, please
49refer to http://www.color.org, and the profile specification.
50
51In summary this library provides:
52
53 * Full source code, free for commercial and non-commercial use.
54 * Support for all version 3.4 header elements, Tags and Tag Types.
55 * Conversion to/from machine native representation of all data
56 types.
57 * Support for user defined Tags.
58 * Support for adding/deleting Tags.
59 * Support for Tag type sharing within a file (often used for
60 sharing LUTs amongst intents).
61 * Support for reading/writing embedded profiles, including
62 from/to a memory buffer, rather than a file.
63 * Provides a single function for transforming color values through
64 a profile, including support for intents, forward and reverse
65 transforms, gamut lookup or preview lookup.
66 * Provides support and code examples for creating all profile
67 types, monochrome, matrix and Lut.
68 * Attempts to be platform neutral.
69 * Loads Tag Types on demand to conserve memory space.
70
71Changes from V1.30
72
73 Change absolute conversion to be white point only, and use
74 Bradford transform by default. (ie. we are now ignoring the
75 comment in section 6.4.22 of the 1998 spec. about the
76 media black point being used for absolute colorimetry,
77 ignoring the recommendation on page 118 in section E.5,
78 and are taking up the recommendation on page 124 in section
79 E.16 that a more sophisticated chromatic adaption model be used.)
80
81 This is for better compatibility with other CMM's, and to
82 improve the results when using simple links between
83 profiles with non-D50 white points. Standard profiles
84 like sRGB will also be more accurate when interpreted
85 with absolute colorimetric intent.
86 This will cause some slight profile inaccuracy when used
87 with profile created with previous versions of icclib.
88
89 Added file I/O class to allow substitution of alternative ICC profile
90 file access. Provide standard file class instance, and memory image
91 instance of file I/O class as default and example.
92 Added an optional new_icc_a() object creator, that takes a memory
93 allocator class instance. This allows an alternate memory heap to
94 be used with the icc class.
95 Renamed object free() methods to del() for more consistency with new().
96
97 Added ColorSync 2.5 specific VideoCardGamma tag support (from Neil Okamoto)
98
99Package contents:
100
101 icclib.zip ZIP archive of the following files
102 README This file.
103 Licence.txt Important! - Permissions for use of this package.
104 icc.c Library source file.
105
106 icc.h Library include file. Note machine dependent defines. Includes
107 icc9809.h.
108 icc9809.h Lightly modified standard ICC header file.
109 iccdump.c Program that dumps ASCII description of a profile.
110
111 icclu.c Program that allows interactive or batch translation of color
112 values though a profile.
113 icctest.c Basic library tag Read/Write example and regression test code.
114
115 lutest.c Color lookup regression test code, and example for creating
116 color profiles.
117 iccrw.c Source code skeleton for reading and then re-writing a profile.
118 jamfile JAM style "makefile" see http://www.perforce.com/jam/jam.html
119 makefile UNIX style makefile. Modify this to suite your system.
120
121
122Style
123
124For handling convenience, I have included all the library source code in
125two files. The down side is that they are both hard to read and navigate
126through. The code could do with some cleaning up and rearrangement, to make
127clear the distinction between public and private elements. (C++ would help
128here, but is less portable.) The code attempts to be ANSI C compliant,
129written in an object oriented style. Unfortunately, it has not been tested
130on a wide variety of platforms, nor with a very wide set of color profiles,
131so there my well be a number of bugs to discover. A tutorial on how to use
132the library would also be a good thing !
133
134The best way to learn how to use the library, is to take a look at
135icctest.c, lutest.c and iccrw.c. The first is used to test writing and
136reading to every type of element, with every possible variation of usage.
137You will need a copy of the ICC spec. handy to understand what it all
138means. The second source file specifically creates and then tests various
139types of profiles, including monochrome, matrix and Lut style profiles. The
140last is a source code skeleton, that reads a profile completely into
141memory, and then writes it out again to a different file.
142
143With the release of version 2.02 of icclib, the library is now as useful as
144it is likely to be, allowing convenient color conversion between PCS
145(profile connection spaces, either XYZ or Lab) and device specific color
146spaces. The library does not attempt to be a complete color management
147system however, lacking profile creation and linking functionality.
148(The Argyll CMS provides full CMS functionality.)
149
150I welcome feedback, positive or negative, so please mail me at
151GraemeGill@access.net.au
152
153Graeme Gill
154