CAMBRIDGE IGCSE (9–1) COMPUTER SCIENCE 0984 · 1.2.3 · CHAPTER 1 LESSON 8

Pixel Lab

Zoom in, paint it, change it: how a computer stores an image.

1 · Zoom in: what is a picture made of?

This picture looks smooth. Drag the zoom slider all the way up.

Then click anywhere on the picture to see what the computer stores for that one spot.

Tip: click the picture to choose where to zoom in.

2 · Paint by binary

The binary on the right tells you the colour of every pixel, row by row, left to right. Paint the grid so that your binary matches the target. Rows that match turn green.

Pick a colour, then click (or drag across) the squares.

Target binary

Your binary

3 · Two dials: resolution and colour depth

Resolution = the number of pixels wide × the number of pixels high. Colour depth = the number of bits used for each colour (each pixel).

Move one slider at a time. Watch the picture AND the file-size bar.

Pixels in the image
Colours each pixel can be
Bits for each pixel

File size

4 · Metadata: the instructions in the file

An image file holds the pixels' binary values one after another — one long line of bits. So how does the computer know where each row ends?

The file also stores metadata: data about the image, such as its width, height and colour depth (and often the date and time it was taken).

5 · Check yourself

Answer every question. If you are wrong, read the feedback and try again. Your first-try score is counted.

6 · Your completion code

Type your full name, exactly as your teacher has it.

Code