DynaPDF Manual - Page 76
Previous Page 75 Index Next Page 77
Page 76 of 821
However, it is also possible to create an Indexed color space manually and to apply it to an image.
This can be useful if a DeviceN color space should be used for an image, e.g. to create a duotone
image. An Indexed color space can be used for images with a color depth of 1, 2, 4, or 8 bits with or
without a color table. An already existing color table stored in the image file will be replaced with
the one of the Indexed color space.
DynaPDF assigns an indexed color space to an image if the graphics state flag
gfUseImageColorSpace is not set (see SetGStateFlags()) and if an indexed color space is active when
inserting the image.
The color table of the Indexed color space should contain 2 ^BitDepth color values. It is allowed to
use a color table with less colors but this is bad practice and should be avoided.
An indexed color space can be created with the function CreateIndexedColorSpace() and must be set
with SetExtColorSpace(). If you want to use the color space for vector graphics or texts pass the
wished index to SetFillColor(), SetStrokeColor(), or SetColors(). The color table is zero based; index 0
refers to the first color; NumColors -1 refers to the last color in the table. An Indexed color space can
contain up to 256 color values.
Separation Color Space
Color output devices produce full color by combining primary or process colorants in varying
amounts. On an additive color device such as a display, the primary colorants consist of red, green,
and blue phosphors; on a subtractive device such as a printer, they typically consist of cyan,
magenta, yellow, and sometimes black inks. In addition, some devices can apply special colorants,
often called spot colorants, to produce effects that cannot be achieved with the standard process
colorants alone. Examples include metallic and fluorescent colors and special textures.
When printing a page, most devices produce a single composite page on which all process colorants
(and spot colorants, if any) are combined. However, some devices, such as imagesetters, produce a
separate, monochromatic rendition of the page, called a separation, for each colorant. When the
separations are later combined - on a printing press, for example - and the proper inks or other
colorants are applied to them, the result is a full-color page.
A Separation color space (PDF 1.2) provides a means for specifying the use of additional colorants or
for isolating the control of individual color components of a device color space for a subtractive
device. When such a space is the current color space, the current color is a single-component value,
called a tint, that controls the application of the given colorant or color components only.
A color value in a Separation color space consists of a single tint component in the range 0 to 255.
The value 0 represents the minimum amount of colorant that can be applied; 255 represents the
maximum. Tints are always treated as subtractive colors, even if the device produces output for the
designated component by an additive method. Thus, a tint value of 0 denotes the lightest color that
can be achieved with the given colorant, and 255 is the darkest. This convention is the same as for
DeviceCMYK color components but opposite to the one for DeviceGray and DeviceRGB.
Previous topic: Device Independent Color Spaces, Special Color Spaces, Indexed Color Space
Next topic: DeviceN Color Space