warning

Content guidance

Contains external content.

Adult supervision recommended

video

Lesson video

In progress...

Loading...

Hi, I'm Dharini.

Welcome to lesson six, your final lesson for the unit Data Representation going audio visual.

For this lesson, you will need a free image editing software GIMP.

So be sure to ask a parent or carer's permission before installing this software on your device.

You will also need pen and paper to make notes.

Remove as most distractions as you can and when you're ready, let's begin.

In this lesson you will recall that bitmap images on pulse code sounds are not the only binary presentation of images and sound available.

You will also be able to define compression and describe why it is necessary.

There is always another way.

Now, what do you think the text on the left represent? Vector images, comprise textual description of geometrical shapes and their attributes.

So the numbers you can see on the left hand side are coordinates, are generally the coordinates and sizes.

They include, vectors images include the keywords like circle, ellipse, part, et cetera.

You've got circles, ellipsis, and their part.

Okay.

So what picture will that be with circles and ellipsis? Did he guess this right? It's an emoji.

Well done.

And this day, this time, the text is not about vector images because you can clearly see there is no use of keyboards, like circle, ellipsis, part, et cetera.

So what do you think this text describes? Maybe musical notes.

Yes, you're right.

This is an extract from a MIDI file.

So MIDI file is like a sheet of music for the computers.

These are the musical notes for chopping.

mid.

Listen to chopping.

mid, a MIDI file.

So what you heard there, it's not the digitised sound.

It is recorded sample by sample and the sound is generated right then and there by the software which reads and renders the notes.

So it does note the digitised sound at all.

Okay, there is always another way.

Images can be represented as a sequence of colour samples.

and coded in binary, which is called colour depth.

That's correct.

Okay.

So these are called bitmaps or raster images.

If images can be represented as a sequence of colour samples encoded in binary, they are called bitmaps or raster images.

Sound can be represented as a sequence of sound samples encoded in binary, and this is called pulse code modulation.

But there're alternatives.

So what alternatives do we already know? Images can be represented as collection of geometrical shapes.

Each with its own attributes and they are called vector images.

Music can be represented a sequence of musical notes with information on how to play them.

So what's the example for this? Yes, you guessed it right.

It's the MIDI file.

An example for this is MIDI file.

So MIDI file is like a sheet of musical note for the computers.

Vector Image Manipulation Demonstration.

So we are going to manipulate vector images using text editor.

Okay.

So any text editor would do.

I'm going to use Notepad.

Okay, vector images are simply textual description of geometrical shapes that makes up an image.

We already seen an example of it, with the use of circles and ellipses to draw an emoji.

So what, what are we trying to achieve? We are trying to achieve, this is the original version of the emoji, which is the grinning face emoji.

Okay.

What do you see? What improvements or what can you see the difference from the original version in your second picture? Yes.

The shapes have been modified.

Its distance has been reduced.

So you will need a text editor and a browser to view the changes as soon as you apply any modification to your vector images.

Okay.

So part one, you mix up an emoji in a text editor.

First, you got to use a browser.

You can use any browser.

You can use Firefox or Chrome to open the vector image, emoji.

svg.

So you have to download emoji.

svg first, before you do anything else.

Remember, when we open it using a browser, it won't become a webpage.

It is still an image stored on your computer, and it is displayed by your browser.

In order to open my emoji file in Google Chrome, I click control and O together.

Make sure to choose the right folder and choose the file you want to open.

So I want to open emoji, the SVG file, the Scalable Vector Graphics file.

Now here's my emoji.

The second step will be opening the same image using a text editor.

And I'm going to use the text editor Notepad.

You can use any text editor available on your device.

So I'm clicking on emoji.

Right-click, open with, and then I'm going to use Notepad.

So here is the textual description of the vector images.

And at the top, you can see the fill and the stroke colours for face, shine, shadow, tongue, mouth, cheeks for the emojis.

Okay.

So our second step is also completed.

So on the left hand side, you can see a lot of text.

And this is the text which is displayed on the text editor.

So vector images, remember vector images comprise textual description of geometrical shapes and the attributes.

Okay.

So whatever you see on the left hand side, they'll be displayed in your text editor when you open that image using a text editor.

Okay.

And what about on the browser? So the browser shows the actual image, the vector image being used.

Part three, it's the modification of vector shapes.

So going to modify the attributes of individual shapes that are circle, ellipses, and parts in our emoji.

Okay.

So what are we going to modify? The attributes.

So CX and CY refers to centre of a circle or an ellipse depends on where it's being given.

Okay.

R is the radius of a circle, RX and RY are the radii of an ellipse.

Okay.

So what we're going to change first is CX, which is the centre of a circle or an ellipse from 24 to 28 or radius 20 to 30.

You can delete a shape by selecting its code and then pressing the delete key as well, if you want to delete a shape.

Okay.

Undo Control plus Z, redo Control plus Y.

Okay.

See your changes take effect.

So make sure to save it once you have made the changes on the text editor.

Save the text editor file by pressing Control + S keyboard shortcut of file and save.

Still it work.

Okay.

And then we got to refresh that is reload the image on the browser, on the browser you're using either Firefox or the Chrome.

So the next part is modification of RGB values.

That is the red, green, blue values of the vector image.

Okay.

So RGB values or for the fill, filling the shape or for the stroke.

Okay.

So fill is the fill colour of the shape and stroke is the stroke colour of the shape.

So if you want, you can change the face.

For example, from RGB two five five that means it's more red and more green.

So two five five, two two nine, zero to RGB 47,204, or 224.

Or you can type in your own values and see how that works.

Okay.

Once you have made the changes on the text editor that is changing the colour value for face, for example, make sure to save it.

So whenever you make changes with the text editor, you must save the text file by pressing Control and S together.

Okay.

And then reload the image on the browser to see all the changes you made reflect in the browser.

So I'm going to make a change with the centre X-coordinate.

So wherever, you can see the CX value as 24.

So if the CX value is 24, change it to 28 and see what happens.

Okay.

So I'm changing the value 24 to 28.

Okay.

So for the first circle, and then the next ellipse, third ellipse, and circle in the fourth row, I have changed the CX value from 24 to 28.

So once you have made the changes, make sure to click on file and save or the keyboard shortcut Control plus S.

Okay.

So actions all saved.

We are back to Chrome page.

This time I'm going to reload the image so we can see any changes to the image.

So you can clearly see the outer circle has changed its position slightly.

Can you see that? Brilliant.

Okay.

Now I'm going to change the fill colour for face.

So the film colour for face is here for the RGB values two, five, five comma two, two, nine, comma zero.

So I am going to change these values.

So my red value from two five five, to 47.

I'm going to change my two two nine for my green value to 204.

And my blue around you from zero to 224.

I'm expecting, there will be some changes with a face colour for my emoji.

So before you go and check in Chrome, make sure to save it in the text editor.

So go to file and click on save.

Or you can use the keyboard shortcut Control + S.

So here are back to Chrome, let us reload the image to see face colour for the emoji has changed.

Yes, it has changed.

Brilliant.

Well done.

Okay.

Task one, vector image manipulation.

Using the worksheet you will modify the text of a vector image and see how it renders in a browser.

Similar to our practise task.

Make sure to pause this video to complete your task.

And once you have completed your task resume this video.

Compression.

Compression.

Sequence of bits representing text in images and sounds, and videos can become extremely long as we get more accurate information then this gets extremely long.

Why is this a problem though? It gives accurate information, but why is this a problem? Because more bits require more space to store, more time to transfer, and more computing power to process.

That's why it is a problem.

So any procedure that reduces the size of a representation is called a compression method.

Okay.

So we going to look at some of the compression examples in our everyday life.

Okay.

So the first one we are looking at is SMS language or textspeak.

So look on the right.

This is an example of an SMS message.

So leave out information that's not important and we replace pieces of message with shorter alternatives, like great to see you tonight.

Thank you.

Okay.

So we leave out information that is not important.

We omit the information that is not important.

And we also replace pieces of message with shorter alternatives.

How much shorter is the compressed message? So if you write it in a proper sentence, count the number of characters and count the number of characters in this message.

Then you can compare how much shorter is the compressed message.

Okay.

Has any part of the original message been lost? Do you think so? No.

It still means the same.

Compression examples, any form of summary.

Compression methods are similar to summarising.

There is omitting unnecessary information.

Okay.

So here is a book "Around the World in 80 Days", and the original message is the text of the book.

Okay.

But Wikipedia has given a summary of the story.

The story of Phileas Fogg of London and his newly employed French Valet Passepartout, who attempted to circumnavigate the world in 80 days on a £20,000 wager.

So a very short Wikipedia summary in comparison with a huge book and with a lot of texts.

Another example of compression, Graded readers books.

We leave out any information that is not important.

So we don't need the title, but you need to categorise this as graded readers book.

Okay.

So the original message will be the text of the book.

"Pride and Prejudice" but graded readers book is the compressed message.

What about just for texts the compression applies? No, it is for images, audios, and videos files as well.

So compressed images that is in.

jpg or.

png.

We leave out any information that's not important and we replace pieces of message with shorter alternatives.

But in images, what sort of information do we omit? We omit the information that is not perceptible to the human eye.

So we've omit the colours that is not perceptible to the human eye, but the original idea has not been lost.

Okay.

So the "Starry Night" van Gogh's famous painting, it's original image is 2000 megabyte.

But when you compress the same image, then at 75% quality, it is 168 MB.

So it's still meeting the 75% quality of that painting, but the size is 12 times smaller than the original version.

Okay.

So the original image is 2000 MB, but the compressed one, at 75% quality is 12 times smaller than the original image.

And if it has 50% quality it's 105 megabyte.

That's 20 times smaller than the originally image.

Now you have seen examples of compression.

So your task two is all, is going to be about compression.

Use the GIMP software to compress images.

Follow the instructions on the worksheet and examine the effect that compression has on its size.

Pause this video to complete your task, and once you have completed resume this video.

Welcome back.

Did they enjoy the task? Brilliant.

So here are the solutions for your task two.

So the first part was about calculating that is uncompressed image size, the original images size.

So the image file kingfisher.

bmp the bitmap file has a resolution of 1024 by 720.

It's colour depth is 24 bits.

Now, use this information to compute the number of bits required to represent this image.

So when you are calculating the size, it's resolution times the colour depth.

So be multiply resolution first, which is the 1024 by 720 is 737,280 pixels.

Okay.

So size will be resolution which is 737,280 pixels multiplied by 24 bits per pixel.

So its final size will be 17,694,720 bits.

Convert the size to bytes and megabytes.

So if you want to convert the bits to bytes, you got to divide the number of bits by eight.

Because eight bits is equal to one byte.

So 17,694,720 bits divide by eight is 2,211,840 bytes.

And if you convert that to megabyte, bytes to kilobyte and megabyte.

First, you got to divide by thousand to find the kilobyte.

So 2, 211,840 bytes divide by 1,000 will be 2,211 kilobytes.

And then when you divide by 1000, again, it's 2.

2 megabytes.

Locate the image file kingfisher.

bmp.

What is the actual size of the file in megabytes? So if you want to find the actual size of any file, you've got to right click on the file and view its properties to see its size.

So according to the file properties, its size as 2.

2 MB, which was around so or 2,211,962 bytes.

Our original answer was 2,211,840 bytes, which was smaller than the actual file value, file size value.

Okay.

Is a size that you computed in step one, identical or even similar to the actual size of the file? The size are almost identical because they're all, both of them are 2.

2 MB, but the actual file size is 122 bytes larger than the computed value.

That is because it include the meta data, additional information called meta data.

So what sort of information included as part of metadata? It could be file type, resolution, how colour is represented, and sometimes where and when the picture was taken.

Now let's look at the compressed file of Kingfisher.

So locate the new file Kingfisher.

80.

jpg.

So click on its properties to see its file size.

So according to the file properties, the file sizes 106.

4 KB.

That, or 106,417 bytes, which is more than 20 times smaller than original file.

Okay.

Because the original file is 2.

2 MB.

Are there any differences between both images because of the reduced file size? What did you think? The actual image file has no visible differences in my opinion, except that when you zoom in, you are able to see the artefacts, especially around the outline of the bird.

So around the outline of the bird, you can see some differences.

Okay.

The new image file has the same resolution and the same colour depth.

Both are same.

Then how can you explain the substantial difference in size between the two files? It's because it has been compressed that's the only difference.

That is the only difference that image file has been compressed.

That means, it has included only the necessary information and removed all the unnecessary information from that image file.

Okay.

So another compressed file is Kingfisher.

20.

jpg.

What does the size of this image file? Did you manage to find out? Well done.

So it's file size is 30.

4 kilobytes or 30,440 bytes, which is more than 70 times smaller than the original file.

What about the image quality? The image quality has visibly deteriorated especially in the background.

So if you reduce the file size to a very low level, then you can expect that to reflect in the image quality as well.

I would love to see your edited emojis.

So if you would like to share your work with Oak National, please ask your parent or carer to share your work on Instagram, Facebook or Twitter, tagging @OakNational and #LearnwithOak.

Hope you enjoy this unit.