Previous Next
352
CHAPTER 4 Graphics
4.8.6 Inline Images
As an alternative to the image XObjects described in Section 4.8.4, “Image Dic-
tionaries,” a sampled image may be specified in the form of an inline image. This
type of image is defined directly within the content stream in which it will be
painted rather than as a separate object. Because the inline format gives the appli-
cation less flexibility in managing the image data, it should be used only for small
images (4 KB or less).
An inline image object is delimited in the content stream by the operators BI
(begin image), ID (image data), and EI (end image). These operators are summa-
rized in Table 4.42. BI and ID bracket a series of key-value pairs specifying the
characteristics of the image, such as its dimensions and color space; the image
data follows between the ID and EI operators. The format is thus analogous to that
of a stream object such as an image XObject:
BI
… Key-value pairs …
ID
… Image data …
EI
TABLE 4.42 Inline image operators
OPERANDS OPERATOR DESCRIPTION
— BI Begin an inline image object.
— ID Begin the image data for an inline image object.
— EI End an inline image object.
Inline image objects may not be nested; that is, two BI operators may not appear
without an intervening EI to close the first object. Similarly, an ID operator may
appear only between a BI and its balancing EI. Unless the image uses
ASCIIHexDecode or ASCII85Decode as one of its filters, the ID operator should be
followed by a single white-space character, and the next character is interpreted
as the first byte of image data.
The key-value pairs appearing between the BI and ID operators are analogous to
those in the dictionary portion of an image XObject (though the syntax is differ-
ent). Table 4.43 shows the entries that are valid for an inline image, all of which
Previous Next