Loading...
Hi, I'm Rebecca, your computing teacher for the data representation's unit.
For this lesson, you're going to need a pen and paper for any calculations or notes that you need to take, and also to remove as many distractions as possible so that you can really focus in this lesson.
Once you've done all of that, we can begin.
In this lesson, you will describe what a pixel is and how pixels relate to bitmap images.
You'll calculate the file size of bitmaps and you'll describe colour depth and resolution.
Your first task is to do some pixel art.
Now I've done one for you in the left hand column there just a simple cross with a square in the middle.
Not very exciting, but see if you can come up with something a little bit more exciting either in the middle box or the final box, it's up to you.
You can do two, you can just do one.
It's fine.
As long as you've got one there, then that's okay.
You are only allowed to use though, one other colour.
So if you've got a pencil, then you can just shade it in with your grey pencil.
Or if you want to use another colour, then that's fine.
But only one of the colours, so you've got to keep white and then any other colour.
So you're going to do that using the worksheet.
If you haven't got a printer, then what you can do is draw that grid out.
It's an eight by eight grid.
You can draw that out on your piece of paper and then fill in the squares that way instead.
So pause the video to complete your task.
So what actually is a pixel? A pixel, which is short for picture element, is the smallest element in an image.
If you magnify an image, you will see that it is made up of these tiny elements and you can see that happening there on your screens.
The enlarged area is eight by four pixels.
Pixels can be any colour, but only one colour.
And this way of representing an image is called a bitmap.
The number of pixels in an image is known as the resolution.
This is calculated by knowing the width and height of an image in pixels.
You can represent each pixel in this image with a one or a zero.
A little bit like the images that you've just done.
You can actually take those images now and where you've got your colour you could have that as a one.
So if it was the grey or the black, that can be the one and then the white could be a zero.
So we can represent each pixel with a binary digit.
This image contains eight by eight pixels.
Each pixel is equivalent to one bit.
What might the file size be of this image? Have a think about that.
Pause the video while you do it.
Let's take a look then.
So if we do eight by eight, eight times eight is 64 pixels.
And then 64 times one bit is still going to be 64 because we're only timesing it by one.
So this time it's 64 bits.
So those bits, those ones and zeros all add up to 64 bits and that's how much storage space that bit mapping would take up on the computer.
What is 64 bits in bytes? Think about how you might work that out and try and figure out the answer.
Let's take a look.
So 64 is going to need to be divided by eight because there are eight bits in a byte.
So we have to divide by eight and that leaves us with eight bytes.
So this image will take up eight bytes of storage.
If you want to have more colours in your images then you need more bits.
So this one now has two bits and it's got more colours.
So this image contains eight by eight pixels just like before, but each pixel this time is the equivalent of two bits.
So what might the file size of this image be? Pause the video while you work that out.
Brilliant.
So you still got to do the eight by eight to work out how many pixels there are in that image.
And then you've got to multiply it by the number of bits, which this time is two.
So 64 times two this time is 128 bits.
The number of colours available is limited by the number of bits per pixel.
This is known as colour depth or bit depth.
Using this table as a guide, calculate how many bits will be required for a 256 colour image.
So you can take a look at that and see if you can spot the pattern so you could fill it in.
Brilliant.
Let's take a look then.
So, there are eight bits needed for 256 colours if you spot the pattern there your bits per pixel are going up by one each time, but down the bottom, it's doubling each time.
So that's how you could come up with that calculations for the pattern.
Also, you've got that other trick of working out the maximum decimal number that you can make with those binary digits and then go one above and that's going to give you your number of combinations.
So this image was created using a two-bit colour depth.
Which option shows the correct encoding? Now you might want to pause this while you work it out so that you can see, or you can just.
I'm going to give you about three seconds to work it out.
So you can pause it or you can wait those three seconds.
Let's take a look then.
So it's a two-bit colour image.
So you know it's going to be ones that have separated in two bits.
So the one on the top right is going to be wrong cause that's one bit.
And the one in the top left is definitely going to be wrong because it was zero one one and are three bits, not two.
So we knew that, but then it was between those two, wasn't it? So if you look in the bottom right-hand corner, we know that those three black squares were exactly the same going across the image.
And if you look on the bottom right-hand corner, you've got one one, one zero, zero one.
So they're all different.
So it can't possibly be that one in the bottom right, so it must be the top left one.
The encoding for this two bit colour depth image has been started.
What is the correct coding for the third row? Have a think about that.
Let's take a look at the answer.
So it's zero zero, one one, one one.
And that's because we can see already that one one is been used for black and zero zero has been used for white, and they're the two colours that are being used in that bottom row.
So we can see there, this is going to be zero zero for that white one, and one one for the two black ones there.
So that's why it was correct.
What is the minimum number of bits required for a 32 colour image? Hmm, what do you think? It would be five! So five is the minimum number of bits required for a 32 colour image.
So that's it.
You've got some calculations there that you can use for file sizes of bitmap images.
And you've got an idea there of how bitmap images are represented using binary.
If you'd like to you could please ask your parent or carer to share your work on Instagram, Facebook, or Twitter, tagging @OakNational and #LearwithOak maybe you put your pixel art on there.
And don't forget to work out how many bits where you used for your pixel art and maybe write the binary digits for each colour on there too.
You can even try more adventurous images as well, couldn't you? And maybe you use four colours or maybe even more, if you were doing a four bit depth, then you could have 16 colours and use a larger grid possibly.
So you could do lots of things with pixel art and it actually gets quite interesting and fun to do.
The bigger the more colours that you get.
So you can have a go at those and maybe share those with your parents or carers permission there.
See you soon for next lesson.