Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
ICC profile I/O library (icclib), README file
2
 
3
Date 2002/4/22, Version 2.02
4
 
5
This distribution contains source code which implements the reading and
6
writing of color profile files that conform to the International Color
7
Consortium (ICC) Profile Format Specification, Version 3.4.
8
 
9
For more information about the ICC, and for copies of the specification,
10
please refer to http://www.color.org/.
11
 
12
(Note that this software is written from the ICC V3.4 standard, but the
13
software and its author are not affiliated with, or otherwise connected
14
with the ICC.)
15
 
16
The ICC profile I/O library archive is kept at
17
http://web.access.net.au/argyll/color.html
18
 
19
(Version 2.02 is has a few minor changes and fixups from V2.00.
20
See icc.c for a more detailed change history.) 
21
 
22
Motivation
23
 
24
Color is still very much a black art to many programmers dealing with
25
computer graphics. The ICC Profile Format is an industry attempt to provide
26
an interchange format to help solve the problems of specifying color, and
27
in transferring color graphics from, and between systems and devices.
28
Although the ICC format has been around a number of years, and has long
29
been adopted by companies in the business of providing systems for
30
publishing and printing, and is now widely used as part of commercial
31
operating system support for device independent color, its uptake in the
32
general world of computer graphics has been slow.
33
 
34
The writing of this library was prompted by my private and professional
35
enthusiasm for computer graphics, and color. Inspired by other examples of
36
freely usable software (notably the Independent JPEG Group's free JPEG
37
software, and Sam Leffler's TIFF library), I have decided to make this
38
library available under similar terms.  I hope that this library will
39
provide a starting point for including ICC profile support more widely that
40
is currently the case, particularly in open source code projects.
41
 
42
Overview
43
 
44
This package contains a C software implementation of the ICC Profile
45
Format, Version 3.4. The ICC Profile Format attempts to provide a
46
cross-platform device profile format, that can be used to translate color
47
data created on one device into another device's native color space. For a
48
fuller explanation of what the ICC Profile Format is all about, please
49
refer to http://www.color.org, and the profile specification.
50
 
51
In 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
 
71
Changes 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
 
99
Package 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
 
122
Style
123
 
124
For handling convenience, I have included all the library source code in
125
two files. The down side is that they are both hard to read and navigate
126
through. The code could do with some cleaning up and rearrangement, to make
127
clear the distinction between public and private elements. (C++ would help
128
here, but is less portable.) The code attempts to be ANSI C compliant,
129
written in an object oriented style. Unfortunately, it has not been tested
130
on a wide variety of platforms, nor with a very wide set of color profiles,
131
so there my well be a number of bugs to discover. A tutorial on how to use
132
the library would also be a good thing !
133
 
134
The best way to learn how to use the library, is to take a look at
135
icctest.c, lutest.c and iccrw.c. The first is used to test writing and
136
reading to every type of element, with every possible variation of usage.
137
You will need a copy of the ICC spec. handy to understand what it all
138
means. The second source file specifically creates and then tests various
139
types of profiles, including monochrome, matrix and Lut style profiles. The
140
last is a source code skeleton, that reads a profile completely into
141
memory, and then writes it out again to a different file.
142
 
143
With the release of version 2.02 of icclib, the library is now as useful as
144
it is likely to be, allowing convenient color conversion between PCS
145
(profile connection spaces, either XYZ or Lab) and device specific color
146
spaces. The library does not attempt to be a complete color management
147
system however, lacking profile creation and linking functionality.
148
(The Argyll CMS provides full CMS functionality.)
149
 
150
I welcome feedback, positive or negative, so please mail me at
151
GraemeGill@access.net.au
152
 
153
Graeme Gill