0% found this document useful (1 vote)
2K views3 pages

Data Representation Worksheet 4 Images Answers

This document provides information about data representation of images: 1) It includes an example image with 4 colors that requires 2 bits per pixel and provides a key to shade it as a computer would. 2) It lists the file sizes of 3 sample images with varying resolutions and color depths. Increasing resolution increases the number of pixels and file size. 3) More colors and higher resolution both improve image quality but also increase the file size needed due to more data required to represent each pixel. 4) It demonstrates run length encoding (RLE) compression by encoding repeated pixel data in an image into a binary run length representation to reduce file size without loss of information.

Uploaded by

Usman Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
2K views3 pages

Data Representation Worksheet 4 Images Answers

This document provides information about data representation of images: 1) It includes an example image with 4 colors that requires 2 bits per pixel and provides a key to shade it as a computer would. 2) It lists the file sizes of 3 sample images with varying resolutions and color depths. Increasing resolution increases the number of pixels and file size. 3) More colors and higher resolution both improve image quality but also increase the file size needed due to more data required to represent each pixel. 4) It demonstrates run length encoding (RLE) compression by encoding repeated pixel data in an image into a binary run length representation to reduce file size without loss of information.

Uploaded by

Usman Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Worksheet 4 Images

Data representation

Worksheet 4: Images Answers


1. This image uses four colours so requires 2 bits per pixel. Shade in the image as a
computer using the key.

10 10 10 10 10 10 10 10 10 10 10 10 10 10

10 00 00 10 00 00 10 00 00 10 00 00 00 10

10 00 00 10 00 00 10 00 00 10 00 00 00 10

10 10 10 10 10 10 10 10 10 10 10 10 10 10

10 00 00 10 00 00 10 00 00 10 00 00 00 10

10 00 00 10 00 00 10 00 00 10 00 00 00 10

10 00 11 10 10 10 10 10 10 10 10 10 10 10

10 11 11 10 10 10 10 10 10 10 10 10 01 01

10 10 10 10 11 11 10 10 10 10 11 11 10 10

00 00 00 00 11 11 00 00 00 00 11 11 00 00

Key: 01 00 11 10

2. Calculate the file size of the following images:

Image Number of Colour depth File size in File size in


Resolution colours in bits bits Bytes
Image 1 20 x 20 8 3 1,200 150
Image 2 10 x 10 8 3 300 37.5
Image 3 20 x 20 4 2 800 100

1
Worksheet 4 Images
Data representation

3. How does increasing the image resolution affect the file size?
Increasing the resolution will increase the number of pixels used, therefore increasing
the file size since each additional pixel will require extra binary data to store its colour
value.

4. Explain the relationship between image quality and file size


As the number of pixels increases in the same area, the quality improves, as does the
file size. As the number of colours in an image increases, the data required to store a
greater number of colours increases, as does the quality and the file size.

2
Worksheet 4 Images
Data representation
Image Compression

5. Look at the image below: 14px

10px

11011010 00100101 00110010 10100101

The first and second rows of the image above would be stored as 14 lots of 11011010:

11011010, 11011010, 11011010, 11011010, 11011010, 11011010, 11011010,


11011010, 11011010, 11011010, 11011010, 11011010, 11011010, 11011010

The same data could be stored as 00001110-11011010 (14 [binary 00001110] lots of
11011010) without losing any information required to piece together the image again.
This is known as RLE or Run Length Encoding.

Record the data for the third, fourth and fifth lines in the image:

Line Binary image data


number
1 00001110-11011010

2 00001110-11011010

3 00001010-11011010, 00000001-10100101, 00000011-11011010

4 00001001-11011010, 00000011-10100101, 00000010-11011010

5 00001000-11011010, 00000101-10100101, 00000001-11011010

You might also like