liveBook · Manning

Digital halftoning

As explained in How Computers Make Books

A halftone screen is a regular dot pattern or screening process used to reproduce continuous tones in printing or display.

How can a photograph survive a printer that has only black ink and white paper? Digital halftoning answers by arranging black and white pixels into small patterns that the eye reads as gray, much as earlier printing used regular dots of different sizes. The trick is not to create gray ink, but to make a convincing gray appearance. section 8.0 section 8.2 section 8.3

A digital halftone divides an image into small pixel squares, such as 2 × 2 or 4 × 4 blocks. For each block, it selects a black-and-white pattern matching that block’s average gray level. The output keeps the original pixel count, but every pixel is now strictly black or white. section 8.3

A 2 × 2 ordered dither

A 2 × 2 block has four pixels, yet it can represent five gray ranges: from an all-white pattern through progressively fuller black patterns to all black. An ordering table says which pixel turns black first, second, and so on. For the third pattern, pixels whose table values are below 3 become black. Keeping newly black pixels adjacent builds little spots, a choice suited to ink spreading on paper. section 8.3

Figure 8.19 Halftone dots 2 x 2

The 2 × 2 patterns make the basic trade-off visible: a tiny block offers only a few apparent grays, while its clustered black pixels resemble a dot. section 8.3

Dot scale is a trade-off. Small dots can look sharper and give higher effective visual resolution, but larger dots allow more distinct apparent shades. In the camel and gradient comparisons, fine patterns can look fragmented, whereas medium or coarse patterns may look better from a distance; make them too coarse and image resolution suffers. section 8.3

Halftoning sits among several ways to reproduce limited tones:

  • Historical halftone screens projected a grid of varying-size dots onto photographic paper, producing a printable black-and-white image from a negative. section 8.2
  • Thresholding is a simpler computer method for grayscale reproduction. section 8.6
  • Floyd–Steinberg dithering is a more sophisticated computer method alongside digital halftoning. section 8.6
  • The same general methods can reproduce color with few inks or images on displays with few colors. section 8.6

The practical goal is a printable or displayable image that uses only two states per pixel while preserving enough tonal structure to be recognizable. The result depends on viewing distance, the chosen pattern, and the balance between apparent shades and detail. section 8.3 section 8.6

How How Computers Make Books covers it

How deep it goes
Works through 2 × 2 ordered-dither patterns and their dot-size trade-off, while only naming more sophisticated methods.
Examples
Compares camel and gradient images at several dot sizes and builds five 2 × 2 gray patterns.
What you can do after
Build it from scratch by mapping each image block’s average gray level to an ordered black-and-white pattern.
How it connects
Connects halftone screens, ordered dithering, thresholding, Floyd–Steinberg dithering, printing, and limited-color displays.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of How Computers Make Books. The section links point to the parts of the book it draws on.