Back

Image colour depth and resolution

Introduction
File size is very important when talking about images. If a file is large, it takes longer for an application to open it. It also takes longer for a file to be sent over the Internet, resulting in longer waiting times for someone wanting to view a site with large image files on it. On top of these points is the fact that a large image file takes up more storage space. This means you can store fewer images on a pen drive or other storage device with a fixed amount of space. The colour depth and resolution impact on the size of an image file.

ColourDepth

Colour depth
Consider this picture:

ch28d2

We could store each pixel as a 1 or a 0. That means we can use only 2 colours for this picture. For example, if the bit for a pixel was a 1, then the application opening the image would colour the square black. If it was a 0 then it would be white. Because we use 1 bit, we say that this has a colour depth of 1.

We could store the colour information for each pixel using 2 bits, giving us a total of 4 colours we could use. The first colour would be selected when the bits were 00. The second colour when they were 01, the third when they were 10 and the fourth when they were 11. Because we use 2 bits, we say that this has a colour depth of 2 .

We could store the colour information for each pixel using 3 bits, giving us a total of 8 colours we could use (000, 001, 010, 011, 100, 101, 110, 111). Because we use 3 bits, we say that this has a colour depth of 3 .

We could store the colour information for each pixel using 8 bits, giving us a total of 256 colours we could use (I worked this out by doing the sum 28). Because we use 8 bits, we say that this has a colour depth of 8 .

We could store each pixel using 16 bits, giving us a total of about 65000 colours we could use (I worked this out by doing the sum 216). Because we use 16 bits, we say that this has a colour depth of 16 .

Clearly, the more bits I use for each pixel, the bigger the image file is going to be. Some images just won't look very good if they use use too few bits per pixel. For example, a photograph that uses 8 bits per pixel (256 colours) will look poor as photos use thousands of different colours and shades of colour. For a photo, at least 16 bits per pixel (65000 colours) would be necessary. On the other hand, some images such as icons and simple drawings don't use 65000 colours so 16 bits per pixel would result in unnecessarily large files. 8 bits per pixel (256 colours) would do the job very well.

Resolution
The higher an image's resolution, the more detail you can display but the bigger the file will be. Resolution is the word used to describe how clear text and graphics appear on a computer screen or on paper. Low-resolution images appear to be grainy and coarse, with lines that don't appear straight and curves that don't curve round very well. They look jagged. High-resolution images look sharp and clear, with straight lines and accurate curves.

Another way at looking at resolution is to talk about the pixels in a fixed area, for example, pixels per square inch. If I store the information for 10000 pixels in a square inch, that will allow a computer program to draw that square inch fairly well. It has all the information it needs to reproduce the image so that there are 100 dots or pixels in a row, and that row will be an inch long. There will also be 100 rows for the height and those 100 rows will be 1 inch high.

But imagine if I stored the image with 1000000 pixels per square inch. I now have 1000 pixels of information in one row that is an inch long, and 1000 rows. This means a lot more detail squashed into the same area, or to put it another way, a higher resolution image.

Screen resolution (VDU resolution)
Visual Display Unit (VDU) resolution is measured by the number of dots, or pixels, that make up a screen. For example, many VDUs used to be set to a resolution of 800 x 600 pixels, or 480 000 pixels. This means the screen is set to 800 columns of pixels by 600 rows of pixels and the images that get displayed tended to be larger and less sharp. You could use a higher resolution if you wanted to, however, perhaps 1200 x 1024 pixels. This means that you can get far more detail on the same size screen, although everything will appear smaller. 

Back