Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Starbase Device Drivers Manual - Vol2: HP 9000 Series 700 Computers > Chapter 3 Printer Command Language Formatter

Print Modes

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Four print modes are currently supported on color PCL printers. These modes are color, primary, gray (parameter value grey or gray) and monochrome (parameter value mono or monochrome). The four modes are explained below:

Print Mode: color

The formatter enables PCL printers to provide the additive (red, green, blue) and subtractive (cyan, yellow, magenta) primary colors. Other colors are generated (by the formatter) by dithering the primary colors. An error diffusion algorithm is utilized to develop the appropriate color cell. Each pixel on the bitmap is expanded into a cell whose size is controlled by the PIXEL EXPANSION parameter in the configuration file. Patterns of RGB dots are plotted in the expansion cell to generate a color that the eye perceives as the desired color. The pattern of dots within the expansion cell for each of three planes per row is a fairly complex function of the desired color.

Expansion cell sizes range from 1 to 8. For example, if the size is set to 3, each bitmap pixel is expanded to a 3×3 cell on the plot.

Color mode plotting can take a considerable amount of time depending on the following:

  • size of the image.

  • number of bitmap planes.

  • pixel expansion factor.

  • printer interface type.

  • error diffusion calculations.

Error Diffusion

The actual intensity of each dot in the output print is determined in a complex manner. The output print is organized into planes (one for each primary additive color). Each plane contains rows of output cells, with each row containing dots equal to the number of source pixels times the PIXEL EXPANSION factor (or cell expansion factor). The number of rows in the output is equal to the number of source pixel rows times the PIXEL EXPANSION factor. Thus each pixel is expanded to a larger cell in the output according to the PIXEL EXPANSION factor.

A color map index value is obtained for the source pixel currently being processed. Residual errors which have accumulated from previously processed output dots are added to the color map index value to obtain a desired color map index value. The desired color map index value is then tested against a value equivalent to half bright. If the desired value is greater than half bright, this output dot will be turned on; otherwise it will be turned off. If this output dot is turned on, a new error value equal to the desired color map index (minus full bright) is accumulated in adjacent output dots. If the output dot is not turned on, only the desired value is accumulated in adjacent dots. The result of this process is that errors in dot intensity are diffused (or accumulated) over adjacent output dots. This process is repeated for each dot being expanded from the source pixel. When the source pixel expansion is complete a new color map index value is obtained for the next source pixel, and the process is repeated.

The error diffusion method works well for most color intensities. Certain color intensities result in the generation of unwanted patterns. This is most noticeable with gray (R=G=B) in the range of 0.3 to 0.7. Note that this unwanted pattern problem is discussed in ACM Transaction on Graphics, vol. 6, no. 4, October 1987.

Print Mode: color2

The color2 mode uses the same algorithm as the color mode, with the addition of random noise to each pixel. This random noise breaks up unwanted patterns sometimes seen in large areas of gray. One result of the added random noise is introduction of random (different) color dots, particularly in regions of low luminosity.

Print Mode: primary

While error diffusion is useful for solid images, it is not adequate for line drawings since lines appear intermittent due to "holes" in the dither pattern. The primary mode supports direct generation of lines using the primary colors (red, green, blue, cyan, yellow, magenta, black, and white).

In primary mode, the user's PIXEL EXPANSION factor dictates the size of a solid cell for each pixel. PIXEL EXPANSION values of 1 to 8 are supported for primary mode. For example, if a bitmap line is green and the configuration file specifies an expansion of 4, then each green bitmap pixel is reproduced by a 4×4 array of green dots.

Print Mode: gray

Gray mode maps each RGB pixel into a gray intensity value according to the YIQ color model. The YIQ color model maps Y into the same chromaticity as luminosity in the CIE color model according to the formula:

0.30 * red + 0.59 * green + 0.11 * blue

This formatter maps gray intensities into an 8×8 ordered dither pattern providing 65 shades of gray.

Dithering in gray Mode (Halftoning)

The actual intensity of each pixel on the output print is determined in a fairly complex manner. Essentially the output print is organized into 8×8 dither cells (a grid of rows and columns each eight dots across). Then each input pixel is converted from RGB to YIQ yielding an index into a table of ordered dither patterns. Next the input pixel is expanded to a larger cell according to the PIXEL EXPANSION parameter. Finally, this cell is copied (tiled) from the ordered dither pattern onto the output page. The actual portion of the 8×8 ordered dither cell pattern copied is determined by the row and column position of the source pixel and output print location. In large areas of similar color the actual dither pattern achieved is 8×8. In areas of rapidly changing color the actual dither pattern achieved may be some smaller size (minimum size = PIXEL EXPANSION parameter).

Disappearing Lines in gray Mode

One result of the dithering method used is that single pixel width lines can disappear. When the pixel is copied from the ordered dither pattern (as discussed above) portions of the source pattern are empty (white). With certain conditions the slope of a single pixel line can be such that it intercepts all black or all white pixels in the dither cell locations being copied. This results in a disappearing line. A similar problem results in a line appearing as random size strings of dots.

This mode was designed to be used with solids and polygons rather than with lines. If the bitmap you desire to print consists of lines you should use monochrome mode, possibly with no background.

Print Mode: monochrome

The monochrome mode maps each nonzero pixel to black. This mode works well for line drawings where a constant (black) intensity is desired for each line. This mode does not work well for solids modeling or filled polygons as every nonwhite pixel maps to black.

Print Mode Differences When Printing Single Planes

The two modes, gray and monochrome have quite different effects when printing from a bitmap which consists of monochromatic foreground and background. Essentially gray mode tries to approximate the actual display as closely as possible in shades of gray. As a result, a display that consists of white text on a black background will be printed faithfully using gray mode. That is, the black background will be printed full black while the white letters will not be printed (white being the absence of subtractive color). Conversely, monochrome mode will print the foreground (that is, the letters) in black and not print the background. The resulting prints will (correctly) appear to be reversed images of each other.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.