6.1
Guidelines for EPSI Files
The following guidelines are to clarify a few basic assumptions about the
EPSI format, which is intended to be extremely simple because its purpose
is for interchange. No system should have to do much work to decipher EPSI
files. The format is accordingly kept simple and option free.
• The preview section must appear after the header comment section, but
before the document prologue definitions. That is, it should immediately
follow the
%%EndComments:
line in the EPS file.
• In the preview section, 0 is white and 1 is black. Arbitrary transfer func-
tions and “flipping” black and white are not supported. Note that in the
PostScript language, 0 and 1 have the opposite meaning (0 is black
and 1 is white) for the
setgray
operator.
• The preview image can be of any resolution. The size of the image is
determined solely by its bounding box, and the preview data should be
scaled to fit that rectangle. Thus, the
width
and
height
parameters from
the image are
not
its measured dimensions, but rather describe the amount
of data supplied for the preview. Only the bounding rectangle describes
the dimensions.
• The hexadecimal lines must never exceed 255 bytes in length. In cases
where the preview is very wide, the lines must be broken. The line breaks
can be made at any even number of hex digits, because the dimensions of
the finished preview are established by the
width
,
height
, and
depth
values.
• All non-hexadecimal characters must be ignored when collecting the data
for the preview, including tabs, spaces, newlines, percent characters, and
other stray ASCII characters. This is analogous to the
readhexstring
oper-
ator.
• Each line of hexadecimal begins with a percent character (
%
). This makes
the entire preview section a PostScript language comment to be ignored by
the PostScript interpreter. The file can be printed without modification.
• Although the EPSI hex preview can be sent to the printer, to shorten trans-
mission time it is recommended that the preview image be stripped out of
the document before transmitting the file to the printer.
• The data for each scan line of the image must be a multiple of 8 bits long.
If necessary, pad the end of the scan line data with 0’s.
6 Device-Independent Screen Preview
25