HP DeskWriter C printer driver development - development of Macintosh driver for HP color ink-jet printer - Technical
William J. AllenRunning on the host computer, the drive provides all of the intelligent formatting, rasterizing, color matching, and dithering for this affordable black and color printer.
A printer driver is a program that provides an interface between an application program and a printer. In the Macintosh and Microsoft(R) Windows environments, the application/driver interface is well-defined. This allows a single driver to serve all applications in a particular environment.
The HP DeskWriter C and DeskJet 500C printers use the same print cartridges and mechanical components to mark the page. Basic print modes and color imaging techniques are the same for both products. To improve clarity, this article focuses on the DeskWriter C (Macintosh) driver. Where appropriate, significant differences in the DeskJet 500C (Microsoft Windows) driver will be pointed out.
To be competitive in the marketplace, a low-cost printer manufacturer must provide drivers for the two most popular windowing environments, Microsoft Windows and the Macintosh operating system. Manufacturers of high-end printers can always include the widely used page description language PostScript(R) to guarantee support of the printer. However, including PostScript in a low-cost color printer like the HP DeskWriter C would be prohibitive, significantly increasing the price of the product.
The alternative is to build into the printer only the logic necessary to put the dots onto the paper fast enough to keep the mechanism busy. This requires the driver, running on the host machine, to provide all of the intelligent formatting, rasterizing (converting logical graphics objects to a bit image), color matching, and halftoning. This approach, of using the host machine's CPU power to create the raster image to be laid down by the printer, is the one that we take with the HP DeskWriter C.
HP DeskWriter C Printer Driver
The HP DeskWriter C driver is a program that sits between the user, the application, and the operating system as shown in Fig. 1. This diagram shows the major paths of communication and control managed by the driver.
The user creates a document using the application, then chooses Page Setup, causing the application to call the printer driver's Page Setup command. The printer driver puts up the Page Setup dialog box for the user and returns the modified page size and printer attributes to the application. The application can use this information to reformat the document for the new attributes. The user then prints the document by selecting Print, causing the application to call the printer driver's Print command. The printer driver puts up the Print dialog box for the user, and when the user is finished making selections the printer driver allows the application to send it a series of page descriptions. These page descriptions are a sequence of imaging commands which describe the page as a series of objects such as text, lines, circles, and raster images (PixMaps). The imaging commands are in QuickDraw, the drawing command language of the Macintosh (similar to GDI, or Graphics Device Interface, in Microsoft Windows).
Now the printer driver will immediately return control of the computer back to the user if the user has enabled background printing, or it will continue processing the print job in the foreground. In any case, the printer driver opens a communication path to the printer (either serial or Apple-Talk), determines which print cartridge is installed in the printer, and then proceeds to use a combination of QuickDraw and its own built-in functions to rasterize the page description into a 150-dpi or 300-dpi PixMap.
This PixMap is then adjusted to compensate for the differences between the display and HP printing technology. This may include color matching for the current media, which attempts to make the printed colors appear the same as the colors on the monitor.
The PixMap is finally halfoned, which involves using various patterns of printed dots to simulate all colors that can be produced on the monitor. For instance, since the printer only has cyan, magenta, and yellow inks, it can't directly produce a purple dot. Purple is produced by printing a mixture of red and blue dots in a checkerboard pattern. Each red dot is made by printing a yellow dot on top of a magenta dot and each blue dot is made by printing a magenta dot on top of a cyan dot. This halftoned data is then compressed and transmitted to the printer.
While a communication path is open to the printer, the driver continuously receives status information from the printer so it can report error conditions such as "out of paper" or "wrong print cartridge installed" (e.g., the color print cartridge is installed, but the document only contains black data).
Rasterization
Fig. 2 gives a closer look at how the printer driver rasterizes a page. The transformation from page description to PCL data takes place in several steps. The rasterizing module uses QuickDraw to do much of the work since the page description is in a set of QuickDraw commands anyway, but it replaces some of QuickDraw's functionality where necessary, such as in the rendering of text. Before Apple's System 7.0, QuickDraw did not provide scalable outline fonts, so the HP DeskWriter C rasterizer contains its own outline font renderer called [Intellifon[TM] from AGFA Compugraphic. This provides all Macintosh users with access to high-quality scalable outline fonts for the most commonly used typefaces.
Because most computers have limited RAM, and rasterizing a 300-dpi page can take a lot of memory (up to 32 megabytes to represent a full color page), the driver usually rasterizes a portion of the page at a time in what is called banding. Banding is pictured in Fig. 3. The less available RAM the computer has, the more bands it takes to rasterize the whole page, and the longer it takes to complete the whole page, because there is a fixed overhead in rasterizing each band. Each object must be examined to determine if it falls within the band. If it does then it is rasterized (drawn) into the band. Otherwise, it is ignored (clipped). Objects that cross band boundaries must be rasterized for each band that they touch. For most common documents, banding adds little or nothing to the print time. Only for very complex documents that have a large number of objects, or for very low-memory conditions, which increase the number of bands, does banding significantly affect the time to rasterize the whole page.
User Interface
This product had a wide range of human factors issues and challenges, all of which were analyzed, designed, and tested. The issues included defining a conceptual use model of the product, hardware design, and integrating aspects of color imaging into a simple driver interface.
To design a product that meets the requirements of our users, we needed to find out who our users are. The key data point returned from market research was that the HP DeskWriter C should be designed for home and business users who do not currently use color, and who do not want to struggle with their computer or printer. Initial market research and human factors concept testing pointed strongly to the necessity for a user-friendly product with good print quality.
Usability studies and iterations of the user interface followed and continued for the next six months. Usability studies are more detailed than concept testing, and are designed to test users' reactions to specific aspects of a prototyped product. To test the user interface, subjects were asked to perform numerous printing tasks in a number of different scenarios. The users were questioned regarding verbiage, ease of use, and functionality offered. Our goal was to design a usable driver without compromising functionality and without creating confusion for less-technical users. We had three formal usability studies during the product design phase, which required a number of iterations to the driver's interface. The results from each study were published by our human factors engineer along with design recommendations for the next iteration. These design recommendations were based on the users' responses to questions, task completion successes or failures, and other observed data.
Dialog Boxes
Fig. 4 shows the final dialog boxes of the user interface. The first two dialog boxes, Print and Page Setup, are accessed from the menu bar. A key design objective was to make these screens as simple and uncluttered as possible. It was decided that only those functions for which frequent change was required would be in the two main dialog boxes. The more technical functions were put into the Colors and Options screens. This was done to decrease confusion for the typical user who would rarely have use for the added features. The defaults were chosen such that most users would not require the Colors and Options dialog boxes.
Features accessed through the Print dialog box are print quality, copies, page range, page order, and print method. Most of these printing features are common to other Apple drivers. Print Method: Use installed print cartridge only is a feature designed specifically for this product. When this checkbox is on, the alert messages prompting the user to exchange the print cartridge, which normally display when there is a discrepancy between the document content and the installed print cartridge, will not appear. This function is explained in further detail later in this section.
The Page Setup dialog box features are consistent with other Apple printers in that they allow the user to choose media type, print orientation, and a scaling value. The distinct features offered by the HP DeskWriter C are the HP Special Paper and the Save as Default checkboxes. The HP Special Paper checkbox is selected when printing on special paper. This causes the driver to adjust the way ink is put on the page so it is optimized for HP special paper. Save as Default offers the user the ability to save item states permanently in the Page Setup, Options, and Colors dialog boxes. For example, a user who always prints on U.S. legal-size paper need only select the paper size once, then check the Save as Default box, and click OK to exit the dialog box. US Legal will then be the new default, instead of the factory default, US Letter. This saves the user time by eliminating the need to enter the Page Setup dialog box for each document.
The Options dialog box, accessed by clicking the Options button in the Page Setup box, contains printing preferences and a Clean Print Cartridge button. This button, when selected, attempts to restore print quality if print becomes faint or dots are missing. This is done by activating a print cartridge priming algorithm in the printer.
Users who want more color capability can find it by clicking the Colors button. The color blending selections determine how dots of the three colors (cyan, magenta, yellow) are arranged on the page to create blended colors. Each of these selections produces slightly different results. Pattern produces faster output than Scatter and is recommended for simple solid-color graphics. Scatter takes longer to print and should be used for sophisticated color graphics, such as scanned images and photographs. Fixed 8 allows applications that support color on the Macintosh Plus, SE, Portable, and Classic computers to print the basic eight colors (red, blue, green, cyan, magenta, yellow, black and white). Fixed 8 is the only color blending setting available for these machines.
When the Complex Color Printing checkbox is on, the driver adjusts the printed colors to provide the best match in appearance to the screen. This capability is recommended for complex color graphics such as scanned images, photographs, and complex computer-generated artwork.
The Intensity slider allows the user to select the amount of color ink that is printed on the page. More ink increases the intensity of the images. Users in high-humidity environments may need to move the slider to the right to decrease the amount of ink on the page, since ink bleeding can occur with increased moisture in the air and on the paper. To assist the user in deciding which slider bar location creates the most desirable output, a color test was created. When the user clicks the ColorTest button, a one-page printout is provided that shows the effects of the intensity settings on text, simple graphics, and a complex color image. The ColorTest feature is designed to save the user time by eliminating the need for numerous experimental printouts to determine the best intensity setting.
The Colors dialog box was created for the more sophisticated color user. The defaults were chosen such that output will be acceptable for the majority of print jobs. Pattern was chosen for its speed over Scatter and the assumption that most users would probably print simple color graphics. The middle setting in the Intensity slider bar is the default; it is designed to work best in most environments.
Print Cartridge Selection
The dialog boxes described above illustrate the user-driver interaction required to control the printer. In addition, it is necessary for the user to interact with the printer hardware by changing print cartridges. Because this is a completely new task to most customers, numerous prototypes were designed and tested before the final solution was created.
Fig. 5 shows one of the print cartridge swap/page setup prototypes that we explored. The three extra buttons labeled Color, Black/GreyScale and Auto Select were provided to give the user a choice of which cartridge to print with. If the user chose Black/GreyScale, the black print cartridge was expected to be in the printer, and the document would be printed in black. If Color was selected, the color print cartridge would be used. If the expected print cartridge was not in the printer, an alert message would appear prompting the user to insert the correct cartridge. If Auto Select was chosen, the document was scanned, and the user was prompted to insert the black print cartridge if only black was present or to insert the color print cartridge if color was present. With a multipage mixed document (black and color pages), the pages would be ordered so that all the black pages were printed first, followed by the color pages, eliminating the need to swap print cartridges more than once. The user was always given the choice of overriding the swap alerts and continuing to print with the current print cartridge.
Tests of this model produced both positive and negative results. On the positive side, users liked the control of selecting the cartridge type themselves, without getting swap alerts. Choosing Black/GreyScale to print a draft of a color document is one example of the control desired. On the negative side, this model required the users to go into the Page Setup dialog box before printing, which was often forgotten. Most subjects felt this extra step cumbersome and not "Macintosh-like."
The final print cartridge swap/page setup model eliminates print cartridge choices from the Page Setup dialog box completely. Instead, the machine scans for color and displays an alert message when a mismatch between the cartridge and the document is found. With this model, the user need not go into the Page Setup dialog box at all. The final model is both easy to follow and gives users the control they want. Instead of having the user select which print cartridge to use, the driver is always in auto select mode. The driver scans the document for color. If none is found, it verifies installation of the black print cartridge in the printer. If the color cartridge is in the printer, the user is alerted to change the print cartridge. The same is done if a color document is being printed and the black cartridge is installed. If the user is printing a document with both black and color pages, the driver firsts prints the pages that can be printed by the installed print cartridge. When printing of those pages is complete, the driver alerts the user to swap the print cartridge, then continues printing the remaining pages. This minimizes the number of user interactions. The control provided by the former design is offered with this model by the Use current print cartridge only checkbox in the Print dialog box. When this box is checked, the driver will print all pages using the current print cartridge in the printer, and will not prompt the user for print cartridge swaps.
Print Modes
In general, print quality settings allow the user to trade print quality for print speed. Draft mode is fastest, and has the additional benefit of saving ink. Mode selection affects the resolution at which the page is rasterized and the timing and placement of the dots that are printed onto the page. The printer's firmware is responsible for managing the mechanism, printhead, and low-level dot control.
Imaging Resolution. Most of the time, HP DeskWriter C drivers operate at 300 dpi. For faster throughput at the expense of resolution, 150-dpi imaging is available as draft mode. Rasterizing at 150 dpi versus 300 dpi speeds up printing in several ways. First, the driver only has to draw objects at half the resolution. Second, at 150 dip, it takes only one fourth as many bands to rasterize a page as it does at 300 dpi, because each band at 150 dpi represents four times as much page area as it does at 300 dpi (memory requirements grow as the square of the resolution). Third, the driver has one quarter the amount of data to halftone, compress, and transmit.
Dot Timing and Placement. The print cartridge contains three colors of ink: cyan, magenta, and yellow. For each primary color, sixteen nozzles are allocated. The nozzles for each primary are separated vertically (Fig. 6). This means cyan ink is always fired onto dry media. Magenta comes next, possibly overprinting cyan, and yellow follows.
In general, the printer can lay 16 rows of each color down at a time and then advance the paper 16/300 inch to lay down the next 16 rows of color. However, there are times when it is advantageous to lay the ink down more slowly while distributing the ink in a single raster row among several different nozzles in the printhead. This process is known as shingling (see Fig. 7). Using shingling, several separate print passes are used to lay the ink down, printing only a fraction of the dots in each raster row during each print pass. The paper is advanced slightly and then more of the pixels representing that row are laid down. The printer supports both 50% shingling and 25% shingling. 50% shingling lays down every other pixel in the row on the first pass and then the remaining pixels in the row on the second pass using a different nozzle of the print head. 50% shingling takes twice as many print passes to print a page and about 50% more time. It doesn't take twice as long, since every other dot is skipped during each pass, allowing the printer to increase the carriage speed without exceeding the maximum nozzle refire rate. Fig. 7 illustrates how the cyan ink will be printed with 50% shingling.
25% shingling is also available. It uses four times as many passes, laying down 25% of the ink in each raster row at a time.
Shingling provides several advantages. Printing each raster in several passes gives the ink a chance to dry before the adjacent dots are laid down onto the page. This is especially important when inks of two different colors are placed next to each other. Shingling allows the first color to partially dry and minimizes bleed (mixing) between the two colors. This is very important for printing on transparency media. Laying the ink down too quickly causes it to bleed and form puddles.
Shingling also distributes the printing of any single raster between two or more nozzles. This is useful for hiding inconsistencies between nozzles, such as a weak or missing nozzle, since it distributes the missing or weak dots among several rasters. A weak nozzle is not very noticeable when 25% shingling is used. Shingling also hides errors in paper feed accuracy in a similar manner.
When draft mechanical quality is selected, the printer will skip every other dot. This not only halves the amount of ink used to print the image, but also allows the printer to increase the carriage speed for the same reason it can when shingling.
Resolution, shingling mode, and mechanical quality are mixed in various combinations to provide the user with three different quality modes for each of three types of media:
Media Type Print Plain Paper HP Special Transparency Mode Paper Draft 150 dpi, no 150 dpi, no Not shingling, shingling, supported draft quality draft quality Normal 300 dpi, no 300 dpi, 50% 300 dpi, 50% shingling, shingling, shingling, normal quality normal quality normal quality Best 300 dpi, 50% 300 dpi, 25% 300 dpi, 25% shingling, shingling, shingling, normal quality normal quality normal quality
Media. HP DeskWriter C and DeskJet 500 C printers are designed to provide good print quality on plain paper, special paper, and transparency media. The special paper and transparency media are specifically designed to work in the printers. They are available from Hewlett-Packard as CX Jet-Series CutSheet Paper and LX JetSeries Transparency Film.
The ink performs differently on the three supported media types. When the user informs the driver which type of media has been selected, the driver takes this into account, and makes appropriate adjustments in the amounts of each ink deposited on the media.
Delivering high print quality on a wide range of plain papers is very difficult. As previously mentioned, print quality varies as a function of paper type and environmental conditions. The black print cartridge is the same one used by the HP DeskJet and DeskWriter printers. It is optimized to perform well over a wide range of plain papers. Similarly, the color print cartridge is designed to perform well on plain papers as well as on special paper. During development, print quality was tested on many different types of plain paper. From this large group, a small set of papers, each representing a significant subset of the universe of papers, was selected. Creating this manageable set of papers for initial evaluation of various inks, print cartridge architectures, and print modes proved valuable. Promising combinations could then be tested against the larger set to ensure robust performance.
Because we can control the design of the special paper, it is adjusted to accommodate the print cartridge. The special paper is coated on one side. The coating causes most of the colorants in the inks to be deposited near the surface of the paper after the inks dry. Concentrating the colorant near the surface increases the saturation of colors. The coating also reduces the sensitivity to environmental conditions. When using special paper, the user is less likely to need to adjust the intensity slider to accommodate environmental extremes.
The transparency medium consists of a plastic substrate and a special coating. The coating accepts the ink. Without the coating, ink would puddle up on the substrate and run together, forming large muddy pools. Like the special paper, the transparency is designed around the print cartridge.
Color Halftoning. Applications communicate with the driver through a stream of QuickDraw commands. These commands specify 24 bits of color for each 300-dpi pixel on the page. The printer can only place three bits of information at each 300-dpi print grid position--one bit for each primary ink. Color halftoning is the process that reduces the information from 24 to 3 bits per print position. By carefully controlling the placement of colored dots, myriad different colors are produced. Cyan, magenta, and yellow are halftoned independently. Cyan is reduced from 8 bits per pixel to 1 bit per pixel. Similar reductions occur for magenta and yellow.
Halftoning increases the effective color depth of the printer. The mechanism can put one of eight different combinations of the primary inks (cyan, magenta, yellow, red, green, blue, black, or white) on the paper at each 300-dpi print position. With halftoning, many more than eight colors can be produced. The increased color depth comes at the expense of spatial resolution. The halftoning techniques used in the HP DeskWriter C driver preserve 300-dpi edges. Spatially, the human visual system is much more sensitive to the edges of an object than to color shifts within the the object. Because the edges are preserved, the reduction in spatial color resolution is not offensive, and the increase in color depth allows complex images, such as photographs, to be reproduced well by the printer.
The user can choose between two color blending (halftoning) algorithms: pattern and scatter. Pattern is a dispersed ordered dither (Bayer's), while scatter uses a form of error diffusion.(1)
Pattern. The pattern algorithm is the default halftoning algorithm. It is a form of ordered dither. It does a good job with almost all types of data, but is best suited to simple graphics composed of large homogeneous regions. Computationally, it is much simpler than error diffusion. An 8 x 8 threshold matrix defines the halftoning pattern. Many different patterns could be used; the best pattern depends on the type of image being printed and on personal taste. To keep the user interface simple, only one pattern is offered: Bayer's dither. This pattern is very good at preserving fine detail. Preservation of detail is especially important when halftoning text that is not being printed at full intensity.
There are 64 cells in the 8 x 8 threshold matrix. Each cell contains an 8-bit threshold. The page is logically tiled with the matrix. Each pixel's 8-bit value is compared with its corresponding position in the matrix. If the pixel's value is greater than the threshold, a dot is fired at that position; otherwise, no dot is fired. This reduces the 8-bit information for the pixel to 1 bit (fire or don't). The process is repeated for all pixels on the page.
In an 8 x 8 area on the page, the number of dots fired can be anywhere from zero to 64. This means a total of 65 (counting none) different amounts of any primary color can be used to fill an area. The original data is 8-bit, representing 256 levels. Because only 65 patterns are used to represent 256 levels, visible contouring may occur when the specified amount of ink gradually varies over a large region of the page.
An example 4 x 4 threshold matrix is shown below. In this case, the pixel values would be scaled between 0 and 16 before halftoning. If a pixel's value were greater than the corresponding threshold matrix entry, that dot would be fired, otherwise it would not be fired.
4 x 4 Threshold Matrix 0 8 2 10 12 4 14 6 3 11 1 9 15 7 13 5
For example, assume a large homogeneous region were being halftoned, and the scaled values in the region were all 8. The resulting pattern of dots fired would be a checkerboard. This is because every other element in the threshold matrix is less than 8.
An obvious feature of the ordered dither is the geometric artifact that is visible when homogeneous regions are halftoned. at 300 dpi, the artifact is small and usually not objectionable. A shortcoming is the inability to represent 256 separate levels. This means a continuously varying gradient will be broken up into bands (or contours) of pixels that all map onto one of the 65 levels.
Scatter. For the scatter halftoning algorithm, a version of the Floyd-Steinberg error diffusion algorithm(1) is used. Unlike ordered dither, error diffusion is not restricted to 65 patterns. A pixel is examined, and if its 8-bit value is greater than 128, a dot is fired. The difference between the specified value and 255 is the error that is produced by putting down a full drop of ink. This error is diffused among four neighboring pixels, reducing their specified values slightly (see Fig. 8). If the original pixel's 8-bit valueu is less than 128, no ink is fired, and the error is simply the pixel's value. In this case, the distributed error increases the values of the neighboring pixels.
Pixels are processed from from left to right along each raster. Rasters are processed from top to bottom. The error from each pixel is broken up into four parts, which are distributed to neighboring pixels. Some noise is added to the error terms to break up artifacts that tend to appear in error diffused data. The average value of the noise is 0, so the image is not lightened or darkened.
Error diffusion does not suffer from contouring. Color gradients are printed as smoothly varying regions of increasing dot density.
Error diffusion can produce artifacts. These are most likely to be visible in large homogeneous regions. It is best suited for complex images like photographs and sophisticated presentation graphics. Hence, it makes a good compliment to the ordered dither algorithm. Error diffusion require more computation than pattern dither, and can degrade throughput. because it is faster, and is best suited for common types of output.
Grey Balancing
In theory, an equal mixture of cyan, magenta, and yellow inks would produce a neutral (white, grey, or black) color. In practice, this does not occur. The particular inks used by the HP DeskWriter C and DeskJet 500C printers, when mixed in equal proportions, typically produce a color with a slight greenish cast. To compensate for this effect, grey balancing is performed before halftoning.
Grey balancing reduces the amount of cyan used for neutral and near-neutral colors. Decreasing cyan increases the relative amounts of magenta and yellow. Magenta and yellow inks together make red, which is the opponent color of green. One can think of the cyan reduction as an increase in red, which compensates for the greenish cast. Unfortunately, reducing the amount of ink on the page makes the color lighter, so the cyan reduction must be balanced against the loss in darkness. Experimentation showed that a cyan: magenta:yellow ratio of 2:3:3 produces good neutral and black colors over a wide range of papers.
The adjustment is made by first computing the saturation of the color.2 The following equation yields a value for S between 0 and 1:
S = (max(c, m, y) - min(c, m, y)) / max(c, m, y).
In this equation, c, m, and y represent the amounts of cyan, magenta, and yellow inks, respectively. Larger values of S indicate more saturated colors, while 0 indicates a neutral color.
The amount of cyan ink is adjusted based on S. If S is 0, cyan ink is reduced to two thirds of its original value. If S is 1, cyan is unaffected. Cyan ink is adjusted linearly between 100% and 67% for intermediate values of S.
Intensity Slider
Possibly the greatest challenge in creating a plain paper color printer is delivering high-quality output over a range of environmental conditions (temperature and humidity) and on a range of media, from copier paper to high-quality cotton bond. Two problems occur when fully saturated colors are printed on some types of paper, or at high humidities. Color bleed occurs when adjacent colors run into each other and mix. Ink can even bleed through the paper and appear on the back side. This can occur even if shingling is used. Bronzing occurs when too much ink is laid down on the paper and the dye sits on top of the paper fibers rather than soaking in. This overabundance of ink crystalizes on the surface and the crystals reflect light. This causes a shiny reflective surface that actually gets lighter as more ink is laid down.
As it turns out, when these problems arise, reducing the amount of ink used in printing the colors usually results in higher-quality output. Use too much ink and you get the problems described above; use too little, and the output looks dull and washed out.
Other factors affect the user's perception of quality and color accuracy, such as room lighting, computer display variations, personal taste, and the type of data being printed such as line art versus an image. Rather than attempt to characterize all of these factors, we supply a control that is analogous to the brightness control on a television set. This is called the intensity slider.
The intensity slider is a five-position slider available under the Options dialog box described above. It allows the user to control the intensity (saturation) of the colors on the page. This is done by controlling how much ink is used to create any particular color, which affects how saturated the color appears as well as other print quality factors described previously. At the slider's lowest setting, it can reduce the amount of ink used to generate a color by as much as 70%. This reduction is applied to the 24-bit data in the rasterized band just before halftoning. At the slider's highest setting, no reduction in ink volume occurs. The degree to which ink is reduced is a nonlinear function dependent on how much ink was specified in the first place. The percentage reduction is larger for more saturated colors, because these colors are most affected by problems associated with media type and environmental conditions.
Edge Enhancement
One unfortunate side effect of the intensity slider is that colors that would normally be a solid area fill of ink are now created with a dithered pattern of dots. This is even true for black printed with the color cartidge. At the minimum setting, about one third of the maximum possible volume of fills, but the edges of black characters will be rough in appearance and may have color halos.
The driver implements a simple edge enhancement algorithm. If a pixel is black and one or more of its four nearest neighbors (north, south, east, or west) are white, it is considered an edge pixel. Edge pixels are always printed with one drop each of cyan, magenta, and yellow. They are never depleted.
Fig. 9 shows how edges are enhanced.
Selection of Printed Colors
The color halftoning techniques previously described allow the printer to produce myriad colors. The task of determining which colors to print seems simple, but turns out to be complex. At first glance, one might suggest putting colors on paper that exactly match the colors on the monitor. In practice, this produces surprising results. The situation is further complicated by the type of image printed. Processing a scanned image of a person's face and a bar chart in the same manner may not be a good idea.
The goal is to not surprise users when they receive the output. To this end, the HP DeskWriter C driver allows the user to choose between two color selection paradigms. The default is optimized for simple business graphics, but usually gives acceptable results with any type of output. The Complex Color Printing checkbox biases color selection for scanned photographs, sophisticated presentation graphics, and other complex images.
Chroma-Based Selection (Default).
The default color selection model places a high priority on the chroma (colorfulness judged relative to a neutral area of similar lightness) of colors. On CRTs, chroma increases when the beam intensity of one or two of the electron guns is increased. This also produces a lighter color. On paper, chroma is increased by putting down more of one or two primary inks; this darkens the color. In the chroma-based selection scheme, priority is given to chroma over lightness. When printing simple business graphics, such as bar and pie charts, customers usually desire solid, high-chroma colors. The fact that printed colors appear significantly darker than monitor colors is not objectionable; it is usually desirable.
Colors are passed to the driver in RGB format. Red modulates the amount of cyan ink, green modulates magenta ink, and blue controls yellow. More red on the screen means less cyan on the paper. The cyan, magenta, and yellow inks can be thought of as "negative red," "negative blue," and "negative green," respectively.
A one-dimensional correction function is independently applied to each primary before it is halftoned. This function accounts for two factors. First, the perceived intensity of the monitor is not linearly related to electron gun voltage, and second, the perceived darkness on the paper is not linearly related to the amount of ink deposited in a given area.
When high-chroma colors are darkened by the driver, they are not as distinguishable as their counterparts on the monitor. This is not generally a problem, but some applications are capable to producing fairly complex business graphics. For example, in a three-dimensional bar chart, the top, front, and side of a bar can be colored with different tones of the same hue. This gives the illusion of depth on the screen. If the three faces of the bar don't have the correct tones on paper, the sensation of depth is reduced. In this case, appearance-based color selection may give superior results.
Appearance-Based Selection.
Scanned photographs and other sophisticated images can be distorted objectionably by chroma-based color selection. In these images, differences in lightness often convey depth information. Artificially darkening high-chroma colors can make the output look unnatural. HP DeskWriter C users can instruct the driver to optimize color selection for these types of output.
A white patch on a monitor is not the same color as white paper. This can easily be seen by holding a piece of paper next to a CRT. White viewed on the monitor will (probably) have a bluish cast. The bluishness is not usually noticeable because the human visual system is remarkably adept at accommodating a wide variety of white points. Through green, grey, and rose colored sunglasses, snow looks white, grass looks green, and other objects appear as expected. This is the phenomenon of color constancy. The visual system adapts to the monitor's white. Only when another suitable reference white is placed in its proximity does the monitor appear bluish.
If colors on paper were selected to match the monitor exactly, monitor white would have to be printed as a pale blue tint. However, the eye has difficulty in accepting tinted paper as white. Because the HP DeskWriter C printer is a 300-dpi binary printer, pale blue must be created by a sparse scattering of relatively large blue dots. Monitor white is homogeneous, while the paper pale blue version would appear textured.
A better approach is to accept the fact that unmarked paper and the monitor appear white when considered independently. Colors are selected for printing so they appear, relative to unmarked paper, the same as the monitor's colors appear relative to the CRT's white point.
Gamut Issues.
The gamut of a color device is the set of all colors it can reproduce. Typical monitors have a larger gamut than the HP DeskWriter C printer. This means they can display colors that cannot be reproduced by any combination of the printer's cyan, magneta, and yellow inks. A device's gamut can be modeled as a three-dimensional solid. The shape is irregular, but roughly resembles a lumpy foot-ball. The idea is to compress the monitor's gamut so that it fits inside the printer's gamut. Some compromises must be made when choosing a gamut compression algorithm, and although objectionable distortion is controllable, it cannot be eliminated altogether.
Characterize Monitor.
To match colors on a monitor, it must be known how the colors on the monitor appear to the viewer. A spectroradiometer can be used to measure the colors produced by various intensities of red, green, and blue on a CRT. The device measures the amount of radiant energy emitted by the monitor as a function of visible wave-length. The system is well-behaved, and a reasonably simple model can be used to predict colors accurately once a few constants have been determined.
Apple's Macintosh color monitors all use Sony Trinitron CRTs. The 13-inch Apple monitor was chosen as the target monitor for the HP DeskWriter C driver. Other sizes of Trintron CRTs are available from Apple and other vendors. Other brands of CRTs are also available. However, the 13-inch Trinitron heavily dominates our target customer's environment.
Characterize Printer.
The HP DeskWriter C printer was characterized by printing a sample consisting of hundreds of small patches of different colors. Each patch contained a known percentage of cyan, magenta, and yellow dots. These were measured with a spectrophotometer. This instrument measures the amount of light reflected at various wavelengths across the visible spectrum. From this data, perceived colors can be calculated.
The HP DeskWriter C and DeskJet 500C printers are designed to be used with HP special paper, HP transparency media, and a wide variety of plain papers. The specified special paper was used to characterize the printer. Transparency color selection is always chroma-based, so rigorous color characterization was not required.
Two sets of samples were created, one using the pattern halftoning technique and one using the scatter technique. Each set was printed on special paper and plain paper, resulting in four sets of samples overall.
The choice of plain paper proved to be very challenging. Good print quality is needed across a wide selection of papers. Patches of eight colors were measured on over sixty varieties of plain paper. With this information in hand, a single "representative" plain paper was selected. This good-quality 25% cotton bond was used for the plain-paper characterization.
The selection of a single target plain paper simplified analysis. The user interface is straightforward; it allows the user a simple three-way selection: plain paper, special paper, or transparency. Although print quality may not be optimized for any given plain paper, it is well-controlled on almost all of them. When color accuracy is critical, HP special paper is recommended.
Acknowledgements
Our thank you list is endless, but the following people deserve individual recognition: Dave Parks, Mr. Martin O. Nicholes, Roopa Pathak, Damon Schaefer, and Dan Weeks.
References
1. R. Ulichney, Digital Halftoning, The MIT Press, 1987.
2. J. Foley, A. van Dam, S. Feiner, and J. Hughes, Computer Graphics Principles and Practice, 2nd Edition, Addison Wesley, 1987.
COPYRIGHT 1992 Hewlett Packard Company
COPYRIGHT 2004 Gale Group