PDFlib 8 Windows COM/.NET Tutorial
PDFlib 8 Windows COM/.NET Tutorial
PDFlib 8 Windows COM/.NET Tutorial
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.5.3 Color Management and ICC Profiles<br />
<strong>PDFlib</strong> supports several color management concepts including device-independent color,<br />
rendering intents, and ICC profiles.<br />
Cookbook A full code sample can be found in the Cookbook topic color/iccprofile_to_image.<br />
Device-Independent CIE L*a*b* Color. Device-independent color values can be specified<br />
in the CIE 1976 L*a*b* color space by supplying the color space name lab to setcolor( ).<br />
Colors in the L*a*b* color space are specified by a luminance value in the range 0-100,<br />
and two color values in the range -127 to 128. The illuminant used for the lab color space<br />
will be D50 (daylight 5000K, 2˚ observer)<br />
Rendering Intents. Although <strong>PDFlib</strong> clients can specify device-independent color values,<br />
a particular output device is not necessarily capable of accurately reproducing the<br />
required colors. In this situation some compromises have to be made regarding the<br />
trade-offs in a process called gamut compression, i.e., reducing the range of colors to a<br />
smaller range which can be reproduced by a particular device. The rendering intent can<br />
be used to control this process. Rendering intents can be specified for individual images<br />
by supplying the renderingintent parameter or option to load_image( ). In addition, rendering<br />
intents can be specified for text and vector graphics by supplying the renderingintent<br />
option to create_gstate( ).<br />
ICC profiles. The International Color Consortium (ICC) 1 defined a file format for specifying<br />
color characteristics of input and output devices. These ICC color profiles are considered<br />
an industry standard, and are supported by all major color management system<br />
and application vendors. <strong>PDFlib</strong> supports color management with ICC profiles in the<br />
following areas:<br />
> Define ICC-based color spaces for text and vector graphics on the page.<br />
> Process ICC profiles embedded in imported image files.<br />
> Apply an ICC profile to an imported image (possibly overriding an ICC profile embedded<br />
in the image).<br />
> Define default color spaces for mapping grayscale, RGB, or CMYK data to ICC-based<br />
color spaces.<br />
> Define a PDF/X or PDF/A output intent by means of an external ICC profile.<br />
Color management does not change the number of components in a color specification<br />
(e.g., from RGB to CMYK).<br />
Note ICC color profiles for common printing conditions are available for download from<br />
www.pdflib.com, as well as links to other freely available ICC profiles.<br />
Searching for ICC profiles. <strong>PDFlib</strong> will search for ICC profiles according to the following<br />
steps, using the profilename parameter supplied to load_iccprofile( ):<br />
> If profilename=sRGB, <strong>PDFlib</strong> will use its internal sRGB profile (see below), and terminate<br />
the search.<br />
> Check whether there is a resource named profilename in the ICCProfile resource category.<br />
If so, use its value as file name in the following steps. If there is no such resource,<br />
use profilename as a file name directly.<br />
1. See www.color.org<br />
84 Chapter 3: Creating PDF Documents (Edition for <strong>COM</strong>, .<strong>NET</strong>, and REALbasic)