There has been a spate of posts on The Luminous Landscape about resampling for printing. A few years ago, I posted results of my own studies; you can find some of those posts here. This topic never seems to go away.
Why resample before printing? Because, if you don’t, the driver – or, if you’ve got a Mac, some combination of the driver and the OS – will resample the image for you. Canon and Epson printer drivers (not the printers themselves) have “native” resolutions that are power-of-two ratios of the resolution of what printer engineers call the marking engine, and what we photographers call less precisely the printing mechanism or the print head. For Canon, the “native” resolution is 300 pixels/inch (ppi), and for Epsons, it’s 360 pixels/inch. If you check the “Finest Detail” box in the Epson driver, the native resolution is 720 ppi. There may be an equivalent setting for the Canons; since I don’t use one, I don’t know much about them. The resolution of the marking engine is much finer — 2880 or 1440 dots per inch in some Epsons — but the number of colors producible at that resolution is much fewer; from appropriate viewing distances, the viewer’s eye will average the tiny dots so that she sees a continuous toned image.
The process of going from an image with 8 or 16 bits per color plane — aka a contone image — to a pattern of ink stains on paper is called halftoning. Having looked at the Epson output under a microscope, it appears to me that the algorithm they’re using to make this transition is something called error diffusion with blue noise added, also known as diffusion/dither. In this approach, the printer driver (maybe in combination with the printer; I don’t know precisely which does what) considers the input image to be a target that cannot be hit at every point in the printed output at the resolution of the marking engine. The driver knows – or thinks it knows — the effect of putting down any given dot pattern. So, at the upper left corner of the image, it looks at the input image, and puts down a number (and size) of dots calculated to get as close as it can to the value of the image at that point. It keeps track of how far off it was. Then it considers what should happen at the next possible location where it can put ink, either to the right or down from the previous location. In deciding what ink to put there, it considers not only the value of the image at that point, but the amount and direction of the error left over from the previous printing, printing something as close as it can to a pattern that will correct the previous error and match the current input image value. It can’t do that perfectly, so it keeps track or what is now the new error, and moves on.
The use of the basic error diffusion algorithm loosely described in the previous paragraph can produce some ugly snake-like artifacts. To break these up, noise is added to the image. It works best if the noise is not flat in frequency, but rather is biased towards the higher frequencies where it is less likely to obscure image detail. Such noise is call blue noise by engineers, since blue light has a higher average frequency than, say green or red.
OK, now you know enough to be dangerous about digital halftoning. But you still don’t know why the printer driver needs to have the input image some power-of-two ratio in resolution from the resolution of the marking engine. It’s not ‘cause you’re stupid. It’s not obvious at all, at least to me. There’s no reason why the above algorithm won’t work just fine with the input image of arbitrary resolution. With such an image, there may be places where the image pixel over the dot location is ambiguous. A simple nearest-neighbor decision should be adequate.
With Epson printers, a common resolution of the marking engine is 1440 dots/inch (dpi) in one direction and twice that in the other. You can see that resampling the input image to 360 ppi (note the contone image’s resolution is measured in ppi, while the marking engine’s resolution is measured in dpi, so it’s easy to keep them straight) makes it so that there are 4×8, or 32, different possible dot locations for every pixel in the input image, so it probably makes the driver easier to write, and maybe faster to boot.
In the days when computers were a lot slower, driver speed may have been the long pole in the tent, because the driver can’t fall behind the printer. I doubt if that’s a problem today. The cost to image quality of doing things the way they’re done now is great, because, if the photography forums are any indication, knowledge that an image sent to a printer needs to be – and will – be resampled is far from universal. Writing a printer driver that did away with resampling would eliminate its negative effects on image quality, simplify many workflows, and, perhaps most importantly, give photographers one less thing to worry about.
Leave a Reply