explain the representation of an image as a series of pixels

advertisement
GCSE COMPUTING – 1.4 IMAGES
Candidates should be able to:



explain the representation of an image as a series of pixels
represented in binary
explain the need for metadata to be included in the file such
as height, width and colour depth
discuss the effect of colour depth and resolution on the size
of an image file.
© GCSE Computing
Slide 1
HOW CAN A BITMAP IMAGE BE REPRESENTED IN
BINARY?




Bitmap images are made up of
individual pixels (picture
elements).
The colour of each pixel is
represented as a binary number.
The image is therefore stored as
a series of binary numbers.
The program loading the image
needs to know things like the
image resolution and colour
depth before it can convert the
binary back into an image and
display it.
© GCSE Computing
Slide 2
WHAT IS COLOUR DEPTH?




The colour depth describes how many memory bits are used to
store the colour of the pixel.
If only 1 bit is used (1 bit colour depth) then 2 colours can be
stored (0 = the 1st colour and 1 = the 2nd colour).
This would result in a monochrome
image such as that used by early
computer monitors.
Little memory was needed to store the
screen because:
 Screens were low resolution
(used few pixels).
 Each pixel only used 1 bit of memory.
© GCSE Computing
Slide 3
HOW DOES COLOUR DEPTH AFFECT AN
IMAGE?

If only 1 bit is used per pixel then 2 colours
can be stored.

If 2 bits are used per pixel then 4 colours can be stored.
 00 = colour 1
 01 = colour 2
 10 = colour 3
 11 = colour 4

This means the amount of memory needed to store an image
with 2 bit colour depth is twice that needed to store the same 1
bit image.
© GCSE Computing
Slide 4
HOW DOES COLOUR DEPTH AFFECT AN
IMAGE?



Up to 8 bit colour depth it is possible to have a code for each
colour. This is called direct colour.
Beyond 8 bits it is easier to define a colour by how much RED,
GREEN and BLUE (RGB) it is made up of.
This is called true colour. Modern computer displays use 24 bit
colour depth. 8 bits are used for the amount of Red, Green and
Blue. Pure yellow would be stored as 111111111111111100000000.
Colour depth Number of colours
Notes
1
2
Monochrome
2
4
00, 01, 10, 11 etc.
3
8
000, 001, 010, 011 etc.
4
16
0000, 0001, 0010, 0011 etc.
8
256
Direct colour - 00000000, 00000001 etc.
24
16,777,216
True colour - 8 bits for Red/Green/Blue
© GCSE Computing
Slide 5
WHAT IS RESOLUTION AND HOW DOES IT
EFFECT THE SIZE OF AN IMAGE FILE?






Resolution is a measure of how much detail there is in an image.
A high resolution image can be magnified and still stay sharp.
A low resolution image will appear pixelated (the individual pixels will be
clearly visible) if it is magnified too much.
The resolution depends on the pixel density, the number of pixels per unit of
distance (not the total number of pixels in the image).
It is usually measured in pixels per inch (PPI).
SUMMARY: A bitmap image with a high
resolution will have a greater the file size
than the equivalent low resolution depth
image because more memory is used to
store the colour data of the extra pixels.
© GCSE Computing
Slide 6
WHY DOES METADATA NEED TO BE INCLUDED
IN AN IMAGE FILE?


Metadata is needed in a
bitmap image file because
the software that displays an
image needs to know:
The height and width of the
image


The resolution


so each line of the image starts
in the correct place.
The correct width
metadata.
The wrong width
metadata.
so the image displays at the
correct size.
The colour depth

so the correct number of bits
are used to represent the
colour of each pixel.
© GCSE Computing
Slide 7
Download