Home
MacInfo Home
--

Image Characteristics

 

Definition, Resolution, Compression

Consider this picture(1) :

(to work on it with PhotoShop according to the examples in this section, you can download the full-quality image, 385kB)

The image is composed of a large number of pixels.  Pixels are little squares, each square is of a uniform colour.  We can see them if we enlarge the picture enough, take e.g. the panel above the shop door:

1x

2x

4x

8x

16x

Any digital image looks like a grid of squares:

In PhotoShop, if we look at the Image Size (menu Image, item Image Size..., we see:

The top part of this panel means our picture has 800x600 pixels in it, or 480'000 little squares.

Definition and Resolution

There are three important numbers with each image:

  1. the width, in number of pixels, in our case 800;
  2. the height, in number of pixels, in our case 600;
  3. the desired size of the pixels, in our case 0.1 mm (so that there are 100 pixels per centimeter, or 100ppcm)

The width and height are called the definition :  these numbers tell you how much information you really have, how finely the scene was captured.

The resolution (represented by the little label hanging off the pixel grid in the figure) tells you the density of the pixels in how many pixels per cm.  But that is only an indication of desire.  It tells you nothing about the quality of the picture.

Let us look at the image size panel again, the middle part:

Here we see the resolution (100 pixels per cm) and two other numbers:  the width and height in cm.  Indeed, if we printed the image using 100 pixels per cm and we have 800x600 of them, the printout would be 8cm wide and 6cm high, no surprise.

Changing the resolution only changes the desired physical size, but not the number of pixels nor the quality.

Compression

There is another factor influencing the quality of what we see:  the compression.  If every pixel has to be recorded with its own light intensity values of red, green and blue each taking a byte, then we need 800x600x3 = 1'440'000 bytes anyway.

But suppose the entire image is just one uniform blue rectangle.  Then clearly we don't need to record 800x600 times the same colour, we could suffice by specifying that the entire grid is uniform.

By examining the parts of an image, JPEG compression uses mathematical tricks like this to reduce the amount of information needed e.g. to specify parts like the sky of a landscape or a dark wall.  This is why our 800x600 pixel image needs only 82kB instead of 1'440kB.

However, there are levels of compression:  the higher the desired quality, the fewer tricks can be played, and the larger the file size of the image.

Below are three versions, showing the same fragment of the panel above the shop door in several levels of compression.  For comparison, on the left is this same fragment as it comes from the digital camera.

240x180 pixels fragment
straight from the camera
80x60 pixels from the 800x600 pixel image, enlarged 3 times to show the JPEG compression effects:
Full image is 2560x1920 and takes 1'300kB high quality low compression,
full image is 454kB
medium quality medium compression,
full image is 82kB
low quality high compression,
full image is 44kB

You can watch the three images unenlarged (total of 580kB).

We note that all three images are exactly the same definition: 800x600 pixels, and all the same resolution:  30ppcm (or 72dpi).  They differ only in the degree of compression, i.e. what the JPEG machinery has done to store less in the disc file.  When the image is displayed again in PhotoShop or on a web page, the JPEG machinery recomputes 800x600 pixels from this disc file.


(1) this photo was taken by me and is royalty free.

Valid XHTML 1.0 Strict Valid CSS

next planned revision: 2009-01