4. Image Representation

What is a Bitmap Image?

On a computer, a bitmap image is made of a series of pixels.

This is seen more clearly when you zoom in(or stare dangerously close to the screen!)


What is a Pixel?

A pixel is a single dot of colour.

A bitmap image is a series of pixels that form an image.


Colour Depth

Colour depth is the number of bits used to store each pixel’s colour.

The image to the right has a colour depth of 2. This allows us to code 4 different colours:

00 = white

01 = green

10 = dark orange

11 = light orange


Resolution

Resolution is the width and height of an image in pixels.


The Impact of Colour Depth and Resolution

The higher the colour depth, the greater the quality but the larger the file size.

The higher the resolution, the greater the quality but the larger the file size.


Metadata

Metadata is the additional information that is provided with an image. This is used so that the computer knows key information such as the image’s:

  • Height
  • Width
  • Author
  • Data Created
  • Date Modified
  • Colour Depth
  • Resolution

Calculating Image Size

If an image has 100 x 100 pixels with colour depth of 5 we can calculate the file size in the following way…

File size (in bits) = 100 x 100 x 5  = 50,000 bits

File size in bytes = 50,000 / 8 = 6250 bytes

File size in kilobytes = 50,000 / 8,000 = 6.25 KB

File size in megabyte = 50,000 / 8,000,000 = 0.625 MB

File size in gigabytes = 50,000 / ? = 0.000625GB