The shape of the lesson
By the end of the lesson, learners can
- Pixels in binary: In the lab, paint a few pixels and read off the binary stored for each row.
- Resolution and quality: Lower the resolution in the lab and the image becomes blocky (pixelated); lower the colour depth and the colours become banded.
- Image file size: Every pixel needs (colour depth) bits, so multiply the number of pixels by the colour depth.
- Resolution: number of pixels (width × height).
- Colour depth: bits per pixel; n bits give 2n colours.
- Higher either: better quality, bigger file.
- Size: width × height × colour depth bits, then ÷ 8 and ÷ 1024 as needed.
One picture every idea returns to
An image is a series of pixels (picture elements), and the colour of each pixel is converted to binary so the computer can process it. The resolution is the number of pixels in the image (width × height). The colour depth is the number of bits used to represent each colour; n bits give 2n possible colours. As resolution and colour depth increase, the quality and the file size both increase.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Pictures made of pixels.. Zoom far enough into any digital photo and it breaks up into tiny squares of colour called pixels. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: Pixels in binary | In the lab, paint a few pixels and read off the binary stored for each row. Project tab 3 of the lab (Pixels and binary) and let a student drive it while the class predicts. Your turn: How many colours can be shown with a colour depth of 6 bits? | Whole class, then pairs |
| 13 to 21 min | Teach and check: Resolution and quality | Lower the resolution in the lab and the image becomes blocky (pixelated); lower the colour depth and the colours become banded. Project tab 3 of the lab (Resolution and colour depth) and let a student drive it while the class predicts. | Pairs |
| 21 to 30 min | Teach and check: Image file size | Every pixel needs (colour depth) bits, so multiply the number of pixels by the colour depth. Model the worked example Size of a photo on the board, one line at a time. Your turn: An image is 100 × 50 pixels with a colour depth of 4 bits. What is its size in bytes? | Frayer Model |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 12 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Image file size, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Frayer Model
Pairs fill a four-box grid for the key term: definition, characteristics, examples and non-examples. The non-examples box is where the misconceptions surface, so give it the most time.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| Colour depth is a number of bits, not a number of colours. "A colour depth of 256" is wrong; say 8 bits, which gives 256 colours. | Return to Pixels in binary: ask a pair to state the correct version and show it on the lab before moving on. |
| Resolution is the number of pixels in the image, such as 800 × 600. | It is not the size of the picture in centimetres. |
Representing images: resolution and colour depth: worksheet
6 questions, 12 marks. Written in the style of the papers; no past paper question is reproduced.
Explain how a computer represents an image in binary.
Define resolution and colour depth.
An image is 1024 pixels wide and 768 pixels high with a colour depth of 16 bits. Calculate the file size in KiB. Show your working.
State how many different colours can be represented with a colour depth of 12 bits.
A 640 × 480 image has a colour depth of 1 bit. The colour depth is changed to 8 bits. State the effect on the file size and on the image.
A designer needs an image format that can show 300 different colours. A student suggests a colour depth of 8 bits. Explain whether this is enough and state the smallest suitable colour depth.
Answer key and marking notes
- The image is made of a series of pixels.
- The colour of each pixel is stored as a binary number, using the number of bits set by the colour depth.
- Resolution: the number of pixels in the image.
- Colour depth: the number of bits used to represent each colour (pixel).
- 1024 × 768 × 16 = 12 582 912 bits.
- 12 582 912 ÷ 8 = 1 572 864 bytes.
- 1 572 864 ÷ 1024 = 1536 KiB.
212 = 4096 colours.
- The file size becomes 8 times larger.
- The image can now show 256 colours instead of 2, so it can look more realistic.
- 8 bits give only 28 = 256 colours, which is fewer than 300, so it is not enough.
- 9 bits give 512 colours, so 9 bits is the smallest suitable colour depth.
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
What is meant by the resolution of an image?
- AThe number of pixels in the image
- BThe number of bits used for each pixel
- CThe number of different colours in the image
- DThe physical size of the image when printed
An image has a colour depth of 4 bits. How many different colours can each pixel be?
- A16
- B4
- C8
- D15
The black-and-white image shown is stored using the smallest possible colour depth. What is its file size?
- A48 bits
- B6 bits
- C96 bits
- D384 bits
An artist needs an image to show 200 different colours. What is the smallest colour depth that can do this?
- A8 bits
- B7 bits
- C200 bits
- D16 bits
An image is 1024 pixels wide and 768 pixels high with a colour depth of 24 bits. What is its file size in MiB?
- A2.25 MiB
- B2.36 MiB
- C18 MiB
- D2304 MiB
An image of 1600 × 1200 pixels is resized to 800 × 600 pixels with the same colour depth. What happens to the file size?
- AIt becomes a quarter of the original
- BIt becomes half of the original
- CIt stays the same, because the colour depth is unchanged
- DIt becomes an eighth of the original
Quiz key
Resolution is the number of pixels, width × height. The number of bits per pixel is the colour depth, and the number of colours available depends on the colour depth, not the resolution. The printed size depends on how it is printed, not on the term resolution used here.
24 = 16 different patterns, from 0000 to 1111, so 16 colours. 4 is the number of bits. 8 is 4 × 2 rather than 24. 15 is the largest code, but 0000 is also a colour, so there are 16.
Two colours need a colour depth of 1 bit (0 or 1). There are 8 × 6 = 48 pixels, so 48 × 1 = 48 bits. 6 bits counts only one row or column. 96 bits uses 2 bits per pixel, which is more than 2 colours need. 384 bits uses 8 bits per pixel. The number of black pixels does not matter: every pixel is stored.
7 bits give 27 = 128 colours, which is too few; 8 bits give 256, which is enough. 200 bits confuses the number of colours with the number of bits. 16 bits would work but is not the smallest.
1024 × 768 × 24 = 18 874 368 bits; ÷ 8 = 2 359 296 bytes; ÷ 1024 = 2304 KiB; ÷ 1024 = 2.25 MiB. 2.36 divides the bytes by 1 000 000 instead of 1024 × 1024. 18 MiB skips dividing by 8. 2304 is the size in KiB, labelled with the wrong unit.
The width and height are both halved, so the number of pixels is ½ × ½ = ¼ of the original (480 000 instead of 1 920 000), and the file size falls to a quarter. Half only accounts for one dimension. Colour depth is per pixel, so fewer pixels still means a smaller file. An eighth would need a third halving, such as halving the colour depth too.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.