Pixel Perfect
An image file does not know it is a picture. It is a list of numbers with two dimensions and a price per entry, and once you see it that way the file-size formula is something you can work out rather than remember.
Get the method right under pressure
Free interactive practice on the steps that lose marks under exam pressure.
Start revising freeWhat you'll cover
A picture that does not know it is a picture
Open an image file and look at what is actually stored, and there is no picture in there at all. There is a list of numbers. Each number says what colour one dot should be, and alongside the list there is a note saying how wide the grid is and how tall. ⚠️ The file has no idea it is a photograph of anything. It is a list of numbers, with two dimensions and a price per entry. That sounds like a philosophical aside. It is the most practical thing in this module, because it means you never have to remember the file-size formula. How big is a list? How many entries it has, times what each entry costs. That is the formula, and you have just derived it rather than memorised it. ⚠️ It also settles the thing students get wrong most often here. There are two separate dials. One changes how many entries there are. The other changes what each entry costs. They are not two names for the same idea, and knowing that before you meet their names makes them impossible to confuse.
Words for bitmap images
Five terms. Notice that the third and fourth are the two dials from the previous card, and that they do completely different jobs.
Two dials, two different jobs
Turning either one up makes the file bigger, and that is the only thing they have in common. What they change is quite different.
How to lay out a size calculation
Your specification is explicit that working must be shown and that the answer must arrive in the unit the question asked for. There is an order that makes both easy. Do the whole calculation in bits first. Every quantity you are given works in bits, so staying there until the end means no half-converted numbers wandering through the middle of your working. Then convert ONCE, at the end, to whatever the question wanted. Converting as you go is how people end up dividing by eight twice. ⚠️ And say which convention you converted with. You met on the units topic that this specification accepts either of two, so the same quantity of bits legitimately produces two different figures - which means a bare number is not a complete answer. Give the number, the unit, AND the basis. A weak answer is a number. A strong answer is a number you could defend.
Match each part to what it contributes
- The width and the height in pixels
- The colour depth
- Multiplying those two things together
- Dividing the result by eight
- how many entries the list of numbers holds
- how many bits each single entry costs
- the total size of the image, expressed in bits
- that same total size, expressed in bytes instead
Which dial did that
An image is saved again. It has exactly the same width and height as before, but the file has doubled in size. What must have changed?
- The colour depth went up, so every pixel now costs more bits, while the number of pixels stayed the same
- The resolution went up, adding more pixels to the image
- Both dials must have changed together
- Nothing meaningful changed; file sizes just vary between saves
One image, all the way to kilobytes
An image is 100 pixels wide and 50 pixels high, with a colour depth of 8 bits. Work out its file size in kilobytes, showing everything. How many entries? 100 times 50 = 5,000 pixels. What does each cost? 8 bits. So the total is 5,000 times 8 = 40,000 bits. In bytes: 40,000 divided by 8 = 5,000 bytes. In kilobytes: 5,000 divided by 1,000 = 5 kB, ⚠️ using the decimal convention, where one kilobyte is 1,000 bytes. ⚠️ That last clause is not padding, and here is why. You met on the units topic that this specification accepts either 1,000 or 1,024 bytes to the kilobyte, as long as you say which you used. Convert the very same 40,000 bits using 1,024 instead and you get roughly 4.9 kB. Same image. Same bits. Two different figures, both correct. So an answer of "5" on its own cannot be marked, because nobody can tell whether you converted properly or not. The number, the unit, and the convention - all three, every time. Notice also the order: everything stayed in bits until the very end, and the conversion happened once.
Colours from a bit depth
An image uses a colour depth of 4 bits, meaning four bits are set aside for every pixel. Work out how many different colours that allows.
Total bits in the image
An image is 200 pixels wide and 100 pixels high, and each pixel uses a colour depth of 3 bits. Work out the total size of the image in bits.
Order the size calculation
Put the steps of working out an image file size into the order you should carry them out.
- Multiply the width by the height to find how many pixels there are
- Multiply that by the colour depth to find the size in bits
- Divide by eight to express the same size in bytes
- Convert once more to reach the unit the question actually asked for
- State which convention was used for that conversion
Complete the bitmap paragraph
A single dot of colour within an image is called a _____, and a picture built from a whole grid of them is a _____. The count of how many there are across and down is the image _____. The number of bits set aside for each individual one is the _____.
Two ways to make it bigger
Select the TWO statements that are true.
- Raising the resolution adds more pixels, so there are more entries to store and the file grows
- Raising the colour depth makes every pixel cost more bits, so the file grows
- Raising the colour depth adds more pixels to the image
- A larger file always means a better image, whichever dial was changed
Spot the true bitmap facts
Tap the TWO statements that are true.
- Colour depth is the number of bits used for each pixel
- A file size should be converted to the unit asked for only at the end of the calculation
- Resolution is the number of different colours available
- A colour depth of 4 bits allows 4 different colours
Three image calls
Three situations. Choose the answer that gives the reason as well as the decision.
- A photograph is too large to email. It must end up smaller as a file, but it has to still appear the same size on screen. Which dial do you turn down?
- A student finishes a file-size calculation and writes the answer as "5". What is missing, and why does it matter?
- A question asks for an image file size in kilobytes. At what point in the working should the conversion happen?
Explain how an image is stored and sized
A friend can recite the file-size formula but cannot say why it works, and keeps writing bare numbers as answers. Write them the explanation.
- Explain what a pixel is and what a bitmap image is actually made of
- Explain what resolution and colour depth each control, and why they are two separate things
- Show how to calculate the file size of an image, setting out every step of the working
- Explain when the conversion to the requested unit should happen, and what else has to be stated alongside the number
- Finish with the trade: what is gained and what is paid for whenever either dial is turned up