Previous Next
495
SECTION 6.4 Halftones
2. If the requested gray level is less than the threshold value, paint the device pix-
el black; otherwise, paint it white. Gray levels in the range 0.0 to 1.0 corre-
spond to threshold values from 0 to the maximum available (255 or 65,535).
Note: A threshold value of 0 is treated as if it were 1; therefore, a gray level of 0.0
paints all pixels black, regardless of the values in the threshold array.
This scheme easily generalizes to monochrome devices with multiple bits per
pixel. For example, if there are 2 bits per pixel, each pixel can directly represent
one of four different gray levels: black, dark gray, light gray, or white, encoded as
0, 1, 2, and 3, respectively. For any device pixel that is specified with some in-
between gray level, the halftoning algorithm consults the corresponding value in
the threshold array to determine whether to use the next-lower or next-higher
representable gray level. In this situation, the threshold values do not represent
absolute gray levels, but rather gradations between any two adjacent represent-
able gray levels.
A halftone defined in this way can also be used with color displays that have a
limited number of values for each color component. The red, green, and blue
components are simply treated independently as gray levels, applying the ap-
propriate threshold array to each. (This technique also works for a screen defined
as a spot function, since the spot function is used to compute a threshold array
internally.)
6.4.4 Halftone Dictionaries
In PDF 1.2, the graphics state includes a current halftone parameter, which deter-
mines the halftoning process to be used by the painting operators. The current
halftone can be specified as the value of the HT entry in a graphics state parameter
dictionary; see Table 4.8 on page 220. It may be defined by either a dictionary or a
stream, depending on the type of halftone; the term halftone dictionary is used
generically throughout this section to refer to either a dictionary object or the
dictionary portion of a stream object. (The halftones that are defined by streams
are specifically identified as such in the descriptions of particular halftone types;
unless otherwise stated, they are understood to be defined by simple dictionaries
instead.)
Every halftone dictionary must have a HalftoneType entry whose value is an inte-
ger specifying the overall type of halftone definition. The remaining entries in the
Previous Next