Representing Images

In the last section we looked at how computers represent characters, and representing images is not much different – everything ends up as binary!

GCSE computer science

There are two types of digital image: bitmapped images and vector images. At GCSE, we concentrate on how computers represent vitmapped images.

It is useful to know that vectors are useful in Computer Science as you can resize them without losing any quality. Why? Because they’re made of maths!

When representing an image using a bitmap, the image is broken down into much smaller parts called pixels. A pixel is a small square of solid colour. By combining these squares together, an image can be represented.

The most basic type of image is a black and white (monochrome) image. In these each pixel is represented with a single bit (1 or 0) to represent whether the pixel is black or white.

Representing images - Computer science online tutor

In this particular image:

  • 1 = black
  • 0 = white

Therefore, the second line of the image would be represented as: 0110110

If we increased the number of colours in the image, we would need to increase the number of pixels that represent each pixel. This is beacuse with just 1 bit, there are only 2 unique patterns.

The number of bits required to represent a pixel in an image is known as the colour depth. This can be calculated by identifying how many colours there are in an image. In this example, we have increased the number of colours in the image to 4, requiring 2 bits for each pixel, so a colour depth of 2:

Representing images - GCSE Computer science

In this particular image:

  • 00 = white
  • 01 = black
  • 10 = red
  • 11 = blue

Therefore, the second line of the image would be represented as: 00110100011100

You can see here that because the colour depth has increased, so has the memory required to store the same amount of pixels.

Looking for More?

Sign in to access the following extras on this page for members: Notes



Exam Practice


A Level Content

Looking for something else? Check back soon as new resources are added every week!

Not a member yet? Sign Up or Log In below