top of page

2.4c: Image Storage

Exam Board:
OCR

Specification:
2020

Bitmap Images

Bitmap images are made of pixels - single-colour squares - arranged on a grid.

​

Each pixel is assigned a binary value which represents the colour of that pixel.

​

The quality of a bitmap image depends on the total amount of pixels, this is known at the image resolution.

​

Because it is made of pixels, scaling a bitmap image up will result in a visible loss of quality. Most images on computers are bitmaps, such as photos and screenshots.

face.PNG
Park in the Fall

Vector Images

Vector images are drawn by the computer following precise mathematical instructions to create lines and objects.

​

Vectors are usually smaller in file size compared to bitmaps because each pixel in a bitmap is stored as an individual binary value.

​

Vectors can be scaled up without any loss of quality and are typically used for logos and animations.

How to Calculate the File Size of a Bitmap

File Size = Resolution x Colour Depth

The resolution of an image is the width in pixels multiplied by the height in pixels.

The colour depth (also known as bit depth) is the number of bits that are used to represent each pixel's colour.

 

1 bit represents 2 colours (0 or 1 / black or white). 2 bits will allow for 4 colours, 3 bits for 8 colours, 4 for 16 etc. A colour depth of 1 byte (8 bits) allows for 256 different colours

​

Remember you must multiply the colour depth, not the number of available colours (e.g. 8 not 256).

​

The RGB (Red, Green, Blue) colour model uses 3 bytes (a byte of 256 red shades, a byte of 256 green shades and a byte of 256 blue shades) that together can represent 16.7 million different colours.

Example

Height =

6 bits

face2.PNG

​

Resolution = height x width

Resolution =     8     x     6      = 48 bits

--------------------------

Colour Depth = 1 bit (only 2 colours)

--------------------------

File Size = Resolution x Colour Depth

File Size =        48       x           1          = 48 bits

​

File Size in bytes = 48 ÷ 8 = 6 bytes

File Size in kilobytes = 6 ÷ 1000 = 0.006 kilobytes

Width = 8 bits

Look carefully at the exam question to see if the examiner is expecting the answer in bits, bytes or kilobytes.

​

Always calculate the file size in bits first then:

  • Divide the file size in bits by 8 to convert to bytes.

  • Divide the file size in bytes by 1000 to convert to kilobytes.

Metadata for Images

Metadata is additional data about a file. Common image metadata includes:

​

  • Height in pixels,

  • Width in pixels,

  • Colour depth,

  • Resolution,

  • Geolocation,

  • Date created,

  • Last edited,

  • File type,

  • Author details

 

Metadata is important, For example, the dimensions must be known so the image can be displayed correctly.

Metadata for a picture taken on a smartphone:

Monochrome on Transparent.png

Questo's Questions

2.4c - Image Storage:

​

1. Describe three ways that bitmap and vector images are different. [6]

​

2. Define the terms image resolution and colour depth. [2]

​

3. How many colours can be represented with a colour depth of...

  • a. 1 bit [1]

  • b. 5 bits [1]

  • c. 1 byte [1]     

​

4. How is the file size of an image calculated? [2]

​

5a. An image file has a width of 10 pixels, a height of 8 pixels and a colour depth of 2. What is the file size in bytes? [3]

​

5b. An image file has a width of 120 pixels, a height of 120 pixels and a colour depth of 1. What is the file size in kilobytes? [3]

​

5c. An image file has a width of 32 pixels, a height of 21 pixels and a colour depth of 1. What is the file size in bytes? [3]

​

6. State what is meant by metadata and give three examples of metadata for a graphics file. [3]

Green Eyed Cat

width in pixels, e.g. 720

height in pixels,
e.g. 480

bottom of page