A detailed treatment of the storage and representation of images including encoding and decoding methods. It is not covered in iGCSE. We are learning ...
So that we can ...
Task 1.1 Tiny points of light Where we learn what images on a computer screen are made from Read the following information, carefully, to your shoulder partner.
Use Google advanced image search to choose a bitmap image of a flower which is 100 pixels wide by 100 pixel high. Save the image on your computer and open it in Windows Image Viewer (Right click > Preview). Zoom in as far as you can and discuss with a partner what you see. Take a screen shot of the Image Viewer window and print it out to stick in your notebooks / folders. Where we learn that computer screens use pixels to display images Using a good magnifying glass or a short focus webcam, look carefully at your computer screen. What do you see? Try moving the mouse in front of the magnifying glass. If you do not have a magnifying glass, click here to view an image. Discuss with a partner what you see. No need to write anything :) How a TV Works in Slow Motion - The Slow Mo Guys (11:38)
Click to load PiskelApp and make a bitmap! Task 2.1 Encode two simple images as bitmaps Where we learn how to encode an image into a bitmap If your teacher has not already given you a copy, download the Bitmap Encoding Exercise and print yourself a copy. Follow the instructions on the worksheet. Calculating filesize In these two images, each pixel is encoded with a single bit of data. If the pixel was white, we encoded it with a 0 and if it was black, we encoded it with a 1. To calculate the raw data storage required for such an image, we can use this formula ... BEWARE : bits per pixel is often written as bit depth or colour depth Make a note of this equation in your notebooks and then answer the following questions showing your working.
In order to decode a bitmap, we need to know two things. First the width and height of the grid of pixels and also the number of bits per pixel we have used to encode it. Task 3.1 Drawing bitmaps Where we learn how to decode a bitmap into an image Get some squared paper from your teacher (or download some here) and decode the following bitmaps. They are all 16 pixels wide by 16 pixels high and are encoded using 1 bit per pixel. To make it harder, I've not written them out in a grid the right size (but I have broken them up into bytes to make it easier!) Can you figure out a quick way to draw them? Image 1 It's scary! (01-04) 00000111 11100000 00011111 11111000 00111000 00011100 01110000 00001110 (05-08) 01100000 00000110 11001000 00010011 11011100 00111011 11011110 01111011 (09-12) 11001110 01110011 11000110 01100011 11000000 00000011 01111001 10011110 (13-16) 00111101 10111100 00001100 00110000 00001100 00110000 00001111 11110000 Image 2 What's that in the sky? (01-04) 00000000 00000000 00100000 00000100 00010000 00001000 00001000 00010000 (05-08) 00011111 11111000 00110011 11001100 01100111 11100110 11111111 11111111 (09-12) 10111111 11111101 10111111 11111101 10010111 11101001 00010011 11001000 (13-16) 00010000 00001000 00001000 00010000 00000100 00100000 00000000 00000000 Image 3 That looks nice and cosy (01-04) 00000000 00011000 00000001 10011000 00000110 01111000 00011001 10011000 (05-08) 01100111 11100110 10011111 11111001 00111111 11111100 00110001 10001100 (09-12) 00110001 10001100 00111111 11111100 00111111 11111100 00110001 00000100 (13-16) 00110001 00000100 00110001 00000100 00110001 11111100 00110001 11111100
Task 4.1 Can I make a bitmap with more than 2 colours? Where we learn how increasing the number of bits per pixel increases the number of colours 16 colour bitmap canvas editor Download my wonderful Bitmap Canvas Editor. It is an Excel spreadsheet so you will need Microsoft Excel in order to open it (obviously). Because you have downloaded it from the web, you will need to click the Enable Editing button on the yellow toolbar and because it also contains 'macros' (special code which helps the spreadsheet to work), you will need to click the Enable Content button to make the editor work! You should now have seen that if we use 4 bits to represent each pixel, we can have up to 16 different colours - there are 16 unique combinations of 4 bits and each one can be used to represent a colour! So, if we want more than 2 colours, we simply use more bits per pixel - think binary before you answer these questions.
ADD STEP ABOUT COLOURS - RGB (24 BITS) AND HEX CODES When you created your own 16 colour bitmap, you might have altered the colour palette. Watch the video and try the skills out yourself either on the Turkey image which you can download or on one of your own. If you choose an image of your own, you will probably need to change the file type to gif. Yes, I know I called it a chicken rather than a turkey ... Task 4.2 Calculating the file size of an image with a larger colour palette. Where we learn to calculate file sizes for images with larger colour depth How to calculate filesize You can calculate the filesize of an image which uses more than 1 bit per pixel in the same way as we did before - using this equation : BEWARE : bits per pixel is often written as bit depth or colour depth In general, you should also add 10% extra to the file size for metadata, colour palette information, pixel dimensions and other extra information (see later in the topic). Make a note of this equation in your notebooks / on paper. Answer the following questions in full sentences. Calculate the filesize in bytes of the following images. Remember to add an extra 10% on top to account for metadata.
Task 5.1 Researching resolution Where we learn about the different meanings of the term 'resolution' ... For this activity, create a word processed document with a suitable header, footer and title and use this make notes. Read the information in the notebox and take a screen clipping and past it into your word document.
Visit the Auction Repair website and read about the difference between these two types of 'resolution'. Use the information from the Auction repair website to write some notes about the different meanings of the term resolution. Complete these sentences in your word document. Underline the missing words or write them in a different colour to make it easier to see if you have got the answers correct!
When a bitmap is stored, other information needs to be stored with it to describe what it's like. For instance, the width and height, file type, colour palette and other stuff. This stuff is called metadata - literally, 'data about data'. It accounts for a small part of the filesize of an image. Task 6.1 Revealing secrets Where we learn how to interrogate images to find metadata Download the following image to your computer ... Upload it to Jeffrey's Image Metadata Viewer (or Metapicz if it's not available) and look very carefully at the information that the website gives you about the image ... Not all of them - social media sites tend to strip it from the photos to protect you. Using the information you have found, you should be able to answer these questions ...
Click to load key word list to help you make your own flash cards
EYES Finally, here is a slightly more complex bitmap image generator written in Python. I've commented the code significantly so it should be pretty easy to change. The bitmap is generated in the same folder as the script. If you want a bigger screen, click 'Open in repl.it' ... Frequently Asked Questions (FAQ) |