Previous Next


                                            335
     SECTION 4.8                                                                 Images



     PDF provides two means for specifying images:

     • An image XObject (described in Section 4.8.4, “Image Dictionaries”) is a
       stream object whose dictionary specifies attributes of the image and whose
       data contains the image samples. Like all external objects, it is painted on the
       page by invoking the Do operator in a content stream (see Section 4.7, “Exter-
       nal Objects”). Image XObjects have other uses as well, such as for alternate im-
       ages (see “Alternate Images” on page 347), image masks (Section 4.8.5,
       “Masked Images”), and thumbnail images (Section 8.2.3, “Thumbnail
       Images”).
     • An inline image is a small image that is completely defined—both attributes
       and data—directly inline within a content stream. The kinds of images that can
       be represented in this way are limited; see Section 4.8.6, “Inline Images,” for
       details.


4.8.1 Image Parameters

     The properties of an image—resolution, orientation, scanning order, and so
     forth—are entirely independent of the characteristics of the raster output device
     on which the image is to be rendered. A PDF consumer application usually ren-
     ders images by a sampling technique that attempts to approximate the color val-
     ues of the source as accurately as possible. The actual accuracy achieved depends
     on the resolution and other properties of the output device.

     To paint an image, four interrelated items must be specified:

     • The format of the image: number of columns (width), number of rows (height),
       number of color components per sample, and number of bits per color compo-
       nent
     • The sample data constituting the image’s visual content
     • The correspondence between coordinates in user space and those in the image’s
       own internal coordinate space, defining the region of user space that will re-
       ceive the image
     • The mapping from color component values in the image data to component
       values in the image’s color space

     All of these items are specified explicitly or implicitly by an image XObject or an
     inline image.

Previous Next