CS03-04 Computer Science Coming soon
Working out image and sound file sizes
This lesson is coming soon.
In this lesson
Calculate the file size of a bitmap image from its width, height and colour depth, and of a sound file from its sample rate, duration and sample resolution, convert the result into sensible units for your own board, work out the storage needed for a set of such files, and show the working that carries most of the marks.
What it covers
- IMAGE file size in bits = colour depth x width in pixels x height in pixels (OCR prints it; AQA prints Size (bits) = W x H x D)
- AQA ALSO PRINTS THE BYTES FORM: Size (bytes) = (W x H x D) / 8 - so on AQA the divide-by-8 is inside the printed formula, not an extra step someone remembered
- SOUND file size in bits = sample rate x duration in seconds x sample resolution (AQA prints rate x res x secs; OCR prints sample rate x duration x bit depth)
- Bits to bytes is DIVIDE BY 8, and the prefix step is separate - two divisions, never one. Owned by CS02-05, reused here
- GETTING THE COLOUR DEPTH FIRST when the question gives a number of COLOURS rather than a number of bits - the smallest n with 2 to the n at least as big as the colour count. Two AQA reports in different years name this as the commonest mistake
- AQA's own scope limit: students only need to use colour depth and number of pixels within their calculations
- OCR's own allowance: an allowance for metadata in calculations may be used
- STORAGE CAPACITY FOR A SET OF FILES: work out one, then multiply by how many - and the how-many step is the last thing you do, not the first thing you forget
- EDEXCEL'S DEMAND SHAPE: construct an EXPRESSION rather than always a number, in binary multiples - kibibytes and mebibytes - with the divisor applied to the WHOLE numerator rather than to one term of it
- SHOWING WORKING: AQA states that all but one mark on each of these calculations can be gained from the working shown
Key words
For: AQA GCSE 8525, Edexcel GCSE 1CP2, OCR GCSE J277
On the specification
For teachers
This GCSE Computer Science lesson teaches working out image and sound file sizes. By the end, students should be able to calculate the file size of a bitmap image from its width, height and colour depth, and of a sound file from its sample rate, duration and sample resolution, convert the result into sensible units for your own board, work out the storage needed for a set of such files, and show the working that carries most of the marks. It works through four worked examples and the mistakes examiners report.