10.1 Rulers and Units

As soon as an image is opened in the Image window, two rulers appear, as shown in Figure 10-1. The horizontal ruler is just below the menu bar, and the vertical ruler is on the left side. In this figure, the mouse pointer is located at coordinates (1356, 1128), as the information on the left of the status bar shows. The coordinate units, displayed just to the right of these numbers, are pixels. Because the image zoom factor is 25%, as shown in the status bar, a pixel on the screen actually corresponds to a square of 4 × 4 pixels. Small black triangles on each of the rulers show the mouse pointer’s current horizontal and vertical coordinates.

This is the default setup, and it works for most things in GIMP. The information provided allows you to place the mouse pointer with some precision, especially if you set the zoom factor to 100% or more, as you’ll see later in this chapter.

Rulers measuring in pixels

Figure 10-1. Rulers measuring in pixels

Figure 10-2 looks a lot like Figure 10-1. But observant readers will notice the numbers on the rulers, and at the bottom left, have changed. We changed the units from pixels to millimeters. But what do these millimeters really represent? Because the zoom factor is 25%, these millimeters don’t equate to millimeters in the image but rather to quarters of millimeters. If we change the zoom factor to 100% (for example, by using the menu in the middle of the status bar) and compare the ruler on the screen to a real ruler, we see they don’t match.

Rulers measuring in millimeters

Figure 10-2. Rulers measuring in millimeters

The Scale Image dialog

Figure 10-3. The Scale Image dialog

The problem is that the image size is computed using its resolution. If we choose Image: Image > Scale Image, we get the dialog shown in Figure 10-3, which tells us the current resolution is 72 ppi in both directions. There’s really no reason for this particular default resolution; most screens now use LCD technology and have a resolution close to 100 ppi. If we change the resolution of this image to 100 ppi, we see its dimensions changed in the Scale Image dialog too. Now the image is 658.37 × 987.55 mm. When we apply the change, the size of the image on the screen doesn’t change, but the numbers on the rulers do (unless the units are set to pixels).

The Set Image Print Resolution dialog

Figure 10-4. The Set Image Print Resolution dialog

Adjusting the resolution simply tells us the size at which this image would print given its chosen resolution. Since the resolution is really only important for printing purposes, we suggest making changes via Image: Image > Print Size. In Figure 10-4, we set the resolution to 300 ppi, the normal resolution for printing, and we see the printed image will be 219.46 × 329.18 mm, which is longer than a letter-size sheet and slightly larger than an A4 sheet. When we click OK in this dialog, the ruler graduations change once more, and now we can get the coordinates in the image with the exact values we’ll get when the image prints.

But if you check against a real ruler once more, you’ll see the rulers on the screen are still not displaying actual millimeters. We can fix this by making one final change. The Image: View > Dot for Dot box is still checked, which means that with a zoom factor of 100%, every pixel in the image corresponds exactly to one pixel on the screen. If we uncheck this box, set the image resolution to that of the screen, and set the zoom factor to 100%, the ruler displays actual millimeters.

Using actual millimeters may be handy if we want to build an image that must have specific dimensions when printed; for example, a business card or a label. Of course, the same manipulations may be done using inches.

Available units

Figure 10-5. Available units

Two guides set in an image

Figure 10-6. Two guides set in an image

The available units are shown in Figure 10-5. Pixels are the only exact measure, characteristic of the size of the image. All other measures are relative to the image resolution.

An inch is 25.4 mm. Centimeters, meters, feet, and yards are defined as multiples of millimeters or inches. Points and picas are typographic units, whose definition is not very clear, since the American pica is 4.2175 mm, the French pica is 4.512 mm, and the computer pica is 4.233 mm. It’s probably best to avoid them if possible.

The Image: View menu

Figure 10-7. The Image: View menu

If the rulers bother you, hide them by unchecking the box (Image: View > Show Rulers) or pressing .