Understanding Bitmaps

When you scan an image, e.g. a photograph, it is digitized or converted into a series of discrete units called picture elements or pixels. Each pixel has its own color. Such digitized images are easy for a computer to manipulate.

Gala.jpg (2355 bytes) 4x Zoom RedArrow.gif (67 bytes) Head.jpg (2015 bytes)

Generally images composed with pixels are called raster images or bitmaps. When you open a raster image in an image editing software such as Corel PHOTO-PAINT, the image is displayed on the monitor so that each image's pixel is mapped to the screen pixels (those on your monitor) if you set the zoom level to 100%. As a result, if you run 1024x768 video mode on 14" and 21" monitors, the same image will look 1.5 times bigger on 21" monitor than on 14" because the pixels on 21" are bigger.

However an original hand-drawn work or a photograph has smooth color transitions between colors and shapes. When you are about to bring such image into the computer you have to decide how accurately you want to approximate the original image. The more pixels the scanned image will contain, the more details it could render. The number of pixels per inch represents the input resolution that is used by a scanner to convert the continuous-tone image into its electronic representation. The image resolution measured in pixels per inch (ppi) or dots per inch (dpi), being the same, is the basic parameter that ties the image's dimensions in pixels to a real-world dimensions in inches, millimeters, etc. For example, 0.5"x 0.5" image will be scanned to 150x150 pixels at the resolution of 300 dpi and only 36x36 pixels if you specify the resolution of 72 dpi. And likewise, a printed 100x100 image will be 2"x2" if it has the resolution of 50 dpi and 0.25"x0.25" at 400 dpi.

The physical characteristics of image size is its height and widths in pixels. The resolution as well as its dimensions in inches or millimeters has no direct sense for it. When you create an image in Corel PHOTO-PAINT you specify its size and resolution. If you provide the image size in pixels, the resolution entered has no effect on its actual size in computer memory or disk, nor has it influence on the number of pixels that comprises the image. However, if you enter the image size in inches, then the resolution is used to calculate the image size in pixels according to the following formula:

(Image size in pixels)=(Image size in inches)*(Image resolution in dpi).

In either cases (whether you used pixels to define the image size or inches and resolution), the resolution is stored along with image for use in programs that work with real-world metrics such as illustration and page layout packages.

For example, create two images in Corel PHOTO-PAINT, let one be 1"x1" at 200 dpi and the other - 2"x2" at 100 dpi. Both images look exactly the same in PHOTO-PAINT because both are 200x200 pixels in size (1" * 200dpi = 200 pixels and 2" * 100 dpi = 200 pixels). Save the first image as TIFF in the file Img200.TIF and the other as Img100.TIF. Import both files into CorelDRAW, Corel VENTURA or QuarkXPress and you'll discover that the image from file Img200.TIF looks twice smaller than Img100.TIF. This is because the importing application (CorelDRAW, etc) used the resolution value stored in the TIF file to scale the image during import to make it fit its linear dimensions in inches not pixels because pixels make sense for monitor but have nothing to do with printed documents.

In a bitmap, each pixel has its color. It might be white, black, blue or brown. Unfortunately there are limited number of devices that are capable of reproducing shading. A computer monitor is one of such devices. However laser and inkjet printers, imagesetters, printing presses can't reproduce shading. To make it possible to print continuous-tone images, these devices have to simulate shading by mixing tiny dots of solid color they use.

Most laser printers (not color) use black toner to print images. To produce 50% gray area, the printer fills it with equal number of black and white (empty) interleaving dots that makes an illusion of gray color. There are many ways to create shading simulation:

Original grayscale image Grad1.jpg (315 bytes)
Pattern dither Grad2.gif (688 bytes)
Error diffusion Grad3.gif (1227 bytes)
Halftone screen Grad4.gif (982 bytes)

PostScript devices (imagesetters, many laser printers) use halftone screens. Halftone screening is a conventional method of producing shading and was used way before the computer era. While it is very popular and wide-spread method, a new technology called stochastic screening comes to scene. Stochastic screen looks very similar to error diffusion shown above. While halftone screening varies the size of halftone dots to simulate shading, stochastic screening varies the frequency of halftone dots to create variation from light tones to dark tones. However stochastic screening is still a new technology and many imagesetters and printing presses do not satisfactorily reproduce the small halftone dots this technology uses. Thus halftone screening is still dominant technology and it will definitely prevail still for several years.

To produce color pictures, color separations are printed. Color separation is a process of breaking all color into four basic process colors - Cyan, Magenta, Yellow and Black. Mixing percentages of these colors allows to produce wide range of other hues and shades. Each color separation plate is a grayscale image that is printed using the corresponding ink on the same sheet of paper. These colors being overlaid produce the vision of millions of colors:

Screen.jpg (10335 bytes)

As I said before, halftone screening use regular grid of halftone dots that vary in size to simulate shading. These halftone dots are built of many smaller black pixels that the output device (an imagesetter or laser printer) can print. The size of these pixels is determined by the output resolution of the device. Modern laser printers can print at 600 or 1200 dpi, imagesetter have even finer resolution - up to 3000 dpi and more. This means that physical dot of a laser printer is one 600th of an inch or about 42 microns. 1200 dpi printers have twice smaller dots, 1/1200" or 21 microns. Several device pixels are grouped to produce a halftone cell, i.e. the minimal unit to produce shading. This cell can have shading other than white or black. Of course, the shading is simulated by the number of black device pixels in a halftone cell:

Cell4x4.gif (951 bytes)
4x4 halftone cell
Cell8x8.gif (1432 bytes)
8x8 halftone cell

The small squares on this picture represent the device pixels while the whole cell is the base image unit. You can think of it as a image pixel that can have shades of gray. Obviously, the number of shades that a halftone cell can reproduce depends on the number of device pixels the cell is comprised of. For example, 4x4 cell contains 16 device pixels. If all of them are white, then the cell also represents white. When all pixels are black, the cell is black. If 8 pixels are black and 8 are white, the cell looks like 50% gray. As a result, 4x4 cell can produce only 16 shades of gray (plus white). To increase the number of shades that can be produced we must increase the number of pixels that build a halftone cell. This can be achieved in two ways: 1) by increasing the size of a halftone cell or 2) by decreasing the size of device pixels. The first way will result in increasing image "grain" and loss of picture quality because the halftone cell is the least unit that renders image details. The bigger halftone cell is, the less details in image could be reproduced. The second way of increasing the number of shades means increasing the device's resolution which is obviously limited by technical characteristics of that device.

In practice, the size of a halftone cell is specified in terms of screen frequency that is the number of halftone cells (or they are usually called lines) in one inch. So, the screen frequency is measured in lines per inch or lpi. The higher the lpi value is, the smaller halftone cells become. Thus, 150 lpi means that each halftone cell is 1/150" in size. Even more, if we know the   resolution of the output device we can determine the number of device pixel that comprise one halftone cell. For example, if a printer can print at 600 dpi and we want 100 lpi screen, then each halftone cell is 6x6 device pixels (600/100=6), thus having 36 device pixels. As we can see, a 600 dpi printer can produce only 37 shades of gray at 100 lpi screen frequency. If we can use a laser printer with resolution 1200 dpi, than 100 lpi screen can produce 145 shades of gray that is much better quality. As you can guess, the number of shades of gray can be found by the following formula:

(Number of shades)=((printer resolution, dpi)/(screen frequency, lpi))2+1

We need to add 1 to count white as an extra shade of gray.

Insufficient halftone cell size may result in color transition banding especially on color gradients. It is considered, that 60-85 lpi is a reasonable screen frequency for 600 dpi printers, 100-120 lpi for 1200 dpi devices.

As a last note, use bitmaps that have 1.5-2 times higher resolution than the output screen frequency. For example, if the artwork will be printed at 150 lpi, then the bitmaps in this artwork should be 225-300 dpi to ensure good quality. Lower bitmap resolution will result in poor image quality, higher resolution will just waste disk space and increase printing time without noticeable quality gain.

[ DTP & Graphics | Oberon Home Page ]
Copyright 2000 by Alex Vakulenko. All rights reserved.
This page was last revised on 02/13/00.