| 1 |
ICC profile I/O library (icclib), README file |
| 2 |
--------------------------------------------- |
| 3 |
|
| 4 |
This version is part of ArgyllCMS |
| 5 |
|
| 6 |
------------------------------------------- |
| 7 |
|
| 8 |
Date 22 September 2013, Version 2.15 |
| 9 |
|
| 10 |
This distribution contains source code which implements the reading and |
| 11 |
writing of color profile files that conform to the International Color |
| 12 |
Consortium (ICC) Profile Format Specification, Version 3.4. |
| 13 |
|
| 14 |
For more information about the ICC, and for copies of the specification, |
| 15 |
please refer to <http://www.color.org/> |
| 16 |
|
| 17 |
(Note that this software is written from the ICC V3.4 standard, but the |
| 18 |
software and its author are not affiliated with, or otherwise connected |
| 19 |
with the ICC.) |
| 20 |
|
| 21 |
The ICC profile I/O library archive is kept at <http://www.argyllcms.com/> |
| 22 |
|
| 23 |
Motivation |
| 24 |
|
| 25 |
Color is still very much a black art to many programmers dealing with |
| 26 |
computer graphics. The ICC Profile Format is an industry attempt to provide |
| 27 |
an interchange format to help solve the problems of specifying color, and |
| 28 |
in transferring color graphics from, and between systems and devices. |
| 29 |
Although the ICC format has been around a number of years, and has long |
| 30 |
been adopted by companies in the business of providing systems for |
| 31 |
publishing and printing, and is now widely used as part of commercial |
| 32 |
operating system support for device independent color, its uptake in the |
| 33 |
general world of computer graphics has been slow. |
| 34 |
|
| 35 |
The writing of this library was prompted by my private and professional |
| 36 |
enthusiasm for computer graphics, and color. Inspired by other examples of |
| 37 |
freely usable software (notably the Independent JPEG Group's free JPEG |
| 38 |
software, and Sam Leffler's TIFF library), I have decided to make this |
| 39 |
library available under similar terms. I hope that this library will |
| 40 |
provide a starting point for including ICC profile support more widely that |
| 41 |
is currently the case, particularly in open source code projects. |
| 42 |
|
| 43 |
Overview |
| 44 |
|
| 45 |
This package contains a C software implementation of the ICC Profile |
| 46 |
Format, Version 3.4. The ICC Profile Format attempts to provide a |
| 47 |
cross-platform device profile format, that can be used to translate color |
| 48 |
data created on one device into another device's native color space. For a |
| 49 |
fuller explanation of what the ICC Profile Format is all about, please |
| 50 |
refer to http://www.color.org, and the profile specification. |
| 51 |
|
| 52 |
In summary this library provides: |
| 53 |
|
| 54 |
* Full source code, free for commercial and non-commercial use. |
| 55 |
* Support for all version 3.4 header elements, Tags and Tag Types. |
| 56 |
* Conversion to/from machine native representation of all data |
| 57 |
types. |
| 58 |
* Support for user defined Tags. |
| 59 |
* Support for adding/deleting Tags. |
| 60 |
* Support for Tag type sharing within a file (often used for |
| 61 |
sharing LUTs amongst intents). |
| 62 |
* Support for reading/writing embedded profiles, including from/to |
| 63 |
a memory buffer, rather than a file. |
| 64 |
* Provides a single function for transforming color values through |
| 65 |
a profile, including support for intents, forward and reverse |
| 66 |
transforms, gamut lookup or preview lookup. |
| 67 |
* Provides support and code examples for creating all profile |
| 68 |
types, monochrome, matrix and Lut. |
| 69 |
* Attempts to be platform neutral, and flexibility in its use of |
| 70 |
system file and memory sub-systems. |
| 71 |
* Loads Tag Types on demand to conserve memory space. |
| 72 |
|
| 73 |
Package contents: |
| 74 |
|
| 75 |
icclib.zip ZIP archive of the following files |
| 76 |
README.txt This file. |
| 77 |
License4.txt Important! - Permissions for use of this package. |
| 78 |
icc.c Library source file. |
| 79 |
iccstd.c Library source that uses stdio and malloc system calls. |
| 80 |
|
| 81 |
icc.h Library include file. Note machine dependent defines. |
| 82 |
Includes iccV42.h. |
| 83 |
iccV42.h Standard ICC header file modified up to Version 4.2 spec. |
| 84 |
iccdump.c Program that dumps ASCII description of a profile. |
| 85 |
|
| 86 |
icclu.c Program that allows interactive or batch translation of |
| 87 |
color values though a profile. |
| 88 |
|
| 89 |
icctest.c Basic library tag Read/Write example and regression test |
| 90 |
code. |
| 91 |
|
| 92 |
lutest.c Color lookup regression test code, and example for creating |
| 93 |
color profiles. |
| 94 |
|
| 95 |
iccrw.c Source code skeleton for reading and then re-writing a |
| 96 |
profile. |
| 97 |
|
| 98 |
Jamfile JAM style "makefile" see |
| 99 |
http://www.perforce.com/jam/jam.html |
| 100 |
|
| 101 |
Makefile Generic style makefile. Edit this to select the appropriate |
| 102 |
system makefile rules. |
| 103 |
Makefile.IBMNTMakefile ruleset for Windows NT using the IBM compiler. |
| 104 |
Makefile.OSX Makefile ruleset for Mac OSX environment. |
| 105 |
Makefile.UNIX Makefile ruleset for Linux style environment. |
| 106 |
|
| 107 |
Makefile.WNT Makefile ruleset for Windows NT using the Microsoft Visual |
| 108 |
C++ compiler. |
| 109 |
|
| 110 |
Style |
| 111 |
|
| 112 |
For handling convenience, I have included all the library source code in |
| 113 |
two files. The down side is that they are both hard to read and navigate |
| 114 |
through. The code could do with some cleaning up and rearrangement, to make |
| 115 |
clear the distinction between public and private elements. (C++ would help |
| 116 |
here, but is less portable.) The code attempts to be ANSI C compliant, |
| 117 |
written in an object oriented style. A tutorial on how to use the library |
| 118 |
would also be a good thing ! |
| 119 |
|
| 120 |
The best way to learn how to use the library, is to take a look at |
| 121 |
icctest.c, lutest.c and iccrw.c. The first is used to test writing and |
| 122 |
reading to every type of element, with every possible variation of usage. |
| 123 |
You will need a copy of the ICC spec. handy to understand what it all |
| 124 |
means. The second source file specifically creates and then tests various |
| 125 |
types of profiles, including monochrome, matrix and Lut style profiles. The |
| 126 |
last is a source code skeleton, that reads a profile completely into |
| 127 |
memory, and then writes it out again to a different file. |
| 128 |
|
| 129 |
With the release of version 2.00 of icclib, the library is now as useful as |
| 130 |
it is likely to be, allowing convenient color conversion between PCS |
| 131 |
(profile connection spaces, either XYZ or Lab) and device specific color |
| 132 |
spaces. The library does not attempt to be a complete color management |
| 133 |
system however, lacking profile creation and linking functionality. Icclib |
| 134 |
is part of the Argyll CMS, which does attempt to be a complete color |
| 135 |
management system. Argyll can be used as a more realistic example of the |
| 136 |
use of icclib. I plan at some stage to upgrade icclib to be compatible with |
| 137 |
the recently released ICC V4 spec., but will probably get around to this |
| 138 |
sometime after the next major release of Argyll. |
| 139 |
|
| 140 |
I welcome feedback, positive or negative, so please mail me at |
| 141 |
|
| 142 |
Graeme at argyllcms dot com |
| 143 |
|
| 144 |
Graeme Gill |