Previous Next
347
SECTION 4.8 Images
Note: The interpolation algorithm is implementation-dependent and is not specified
by PDF. Image interpolation may not always be performed for some classes of imag-
es or on some output devices.
Alternate Images
Alternate images (PDF 1.3) provide a straightforward and backward-compatible
way to include multiple versions of an image in a PDF file for different purposes.
These variant representations of the image may differ, for example, in resolution
or in color space. The primary goal is to reduce the need to maintain separate
versions of a PDF document for low-resolution on-screen viewing and high-
resolution printing.
In PDF 1.3, a base image (that is, the image XObject referred to in a resource
dictionary) can contain an Alternates entry. The value of this entry is an array of
alternate image dictionaries specifying variant representations of the base image.
Each alternate image dictionary contains an image XObject for one variant and
specifies its properties. Table 4.41 shows the contents of an alternate image dictio-
nary.
TABLE 4.41 Entries in an alternate image dictionary
KEY TYPE VALUE
Image stream (Required) The image XObject for the alternate image.
DefaultForPrinting boolean (Optional) A flag indicating whether this alternate image is the default ver-
sion to be used for printing. At most one alternate for a given base image may
be so designated. If no alternate has this entry set to true, the base image is
used for printing.
OC dictionary (Optional; PDF 1.5) An optional content group (see Section 4.10.1, “Optional
Content Groups”) or optional content membership dictionary (see “Optional
Content Membership Dictionaries” on page 365”) that facilitates the selec-
tion of which alternate image to use.
Example 4.29 shows an image with a single alternate. The base image is a gray-
scale image, and the alternate is a high-resolution RGB image stored on a Web
server.
Previous Next