Bitmaps and Grayscale Images

The fundamental unit of information on a computer is called a bit. A bit can either be 1 or 0 and is the basis of binary computing. Figure 1.9 shows the simplest kind of computer image, a bitmap.

NOTE There are 8 bits in a byte. Bytes are a common measure of information in a computer. Most files are measured in kilobytes (KB) or megabytes (MB). Hard drives currently store many gigabytes (GB), or billions of bytes of data.

You will open a bitmap and examine it in detail.

1. Open the file StreetBitmap.psd from the CD.

2. Zoom in to the image a few times until you clearly perceive the individual black and white pixels that make it up.

The reason digital imaging works at all is that the human visual system undergoes a figure/ ground shift in perception when presented with a pixel image of sufficient resolution. When you zoom in the image on the right of Figure 1.9, you might not understand what all the pixels represent. It is only when the pixels become small enough and dense enough, that your mind perceives the illusion of the continuous picture.

Each of the pixels in Figure 1.9 is either black or white. This visual information is stored in the computer as either a 1 (white) or a 0 (black). In other words, each pixel is represented by a bit. As such, the bits in memory map directly to the visual image that we perceive, and thus the name bitmap is apt.

NOTE Fax machines transmit bitmap images.

3. Zoom back out to 100% magnification (as shown in Figure 1.9). You can double-click the Zoom tool in the toolbox to do this quickly.

4. Open the file StreetGrayscale.psd from the CD. This image (shown in Figure 1.10) contains far more information than the bitmap in Figure 1.9.

Figure 1.9

Bitmap image: viewed at (left) 100% and (right) 500% magnification

Grayscale Pixels

5. Zoom in to the image until you reach the maximum magnification of 1600% and can clearly perceive the individual grayscale pixels.

6. Click the Eyedropper tool in the toolbox. Select Point Sample from the Sample Size drop-down list on the Options bar.

7. Click a light pixel in the image to sample its color in the foreground color swatch in the toolbox (see Figure 1.11).

Figure 1.10

Grayscale image: viewed at (left) 100% and (right) 1600%

Figure 1.10

Grayscale image: viewed at (left) 100% and (right) 1600%

Figure 1.11

Sampling colors with the Eyedropper

Notice the RGB values for the sample.

Notice the RGB values for the sample.

Colour Pixel Rgb Grayscale Value
Click a pixel in the image to sample its color. Click the foreground color swatch to open the Color Picker.

8. Click the foreground color swatch to open the Color Picker, and then observe the RGB values for the sample. The pixel sampled in Figure 1.11 has a numerical value of 189.

9. Select a darker pixel in the image while leaving the Color Picker dialog box open. Figure 1.12 shows a darker pixel selected whose value appears as 57 in the Color Picker.

10. In the Color Picker, drag the color selector in the color ramp along its left edge from the top, down to the bottom (see Figure 1.13). As you drag the selector, observe the color numbers changing. By dragging along the left edge, you select only grayscale values when the R, G, and B values are all equal.

Figure 1.13 shows the relationship between grayscale value and number. At the extreme ends of the scale, white is represented by 255 and black by 0. All the shades of gray fall somewhere in between.

11. Close StreetBitmap.psd and StreetGrayscale.psd without saving.

Grayscale allows exactly 256 possibilities (including zero) for the value of each pixel. As you probably are aware, 256 is a special number that is a power of 2. More specifically 256 is 2 to the 8th power (2 multiplied by itself 8 times).

It is no coincidence that the number of shades of gray in a grayscale image is tied to powers of 2. The number 2 is important in computers because it is the basis for binary mathematics (ones and zeros). Table 1.1 lists the powers of 2.

Figure 1.12

Sampling a darker color yields a lower number.

Figure 1.13

Understanding color values

Drag selector from here...

Bitmap Powerof2 Table


.to here. .while noticing the color numbers here.

Table 1.1: Powers of 2

power of 2 Number of values bit depth Notes

21 2 l Bitmap mode

24 16 4

25 32 5

28 256 8 Grayscale mode

29 512 9

210 1024 10

211 2048 11

212 4096 12

216 65,536 16 Limit of human perception of tonal differences

224 16,777,216 24 RGB (8 bits/channel)

232 4,294,967,296 32 CMYK (8 bits/channel)

At the top of the table, notice that 2 to the first power yields two possible values: 1 or 0. Bitmap images have pixels that fall into this category because there are only two possibilities for their pixels: black or white.

You can visualize grayscale images as a composite of 8 bitmaps laid on top of each other in imaginary transparent planes called bit planes. When 8-bit planes are overlaid, there are 256 possibilities for each pixel in the resulting image (2 to the eighth power). Grayscale images are known as 8-bit images because 8 is their bit depth, or number of overlaid bit planes.

NOTE Images with greater bit depth require more memory and storage space because they contain more information.

Was this article helpful?

0 0
The Abundance Magnet

The Abundance Magnet

Finally, The Ultimate Guide To Changing Your Life Forever. Get Your Hands On The Ultimate Law of Attraction Guide And Attract Everything You've Always Wanted In Life. Discover How Ordinary People Can Live Extraordinary Lives Through Law Of Attraction.

Get My Free Ebook


  • guglielma
    How to shrink a cad drawing from gigabytes to kilabytes?
    9 years ago

Post a comment