Representation of Images��You need to know:��(k) explain the representation of an image as a series of pixels represented in binary��(l) explain the need for metadata to be included in the file such as height, width and colour�depth��(m) discuss the effect of colour depth and resolution on the size of an image file.
Representing pictures in binary
The page is divided into an invisible grid and each pixel is assigned a colour
Draw a circle
radius: 6 pixels
centre: 10, 10
line thickness: 1 pixel
Drawn by following a set of mathematical instructions
Bitmap images
Certain information must be defined for the bitmap image, this is called METADATA (or data about data)
Size of grid
Width: 20 pixels
Height: 20 pixels
Bitmap images
Resolution depth
How many pixels will there be per unit of length
10 pixels per inch
72 pixels per inch
The greater the resolution depth:
Bitmap images
Colour depth
How many bits will be used to store the colour for each pixel in the grid
1 bit allows 2 different values | 2 different colours |
2 bit allows 4 different values | 4 different colours |
3 bit allows 8 different values | 8 different colours |
... | ... |
8 bit allows 256 different values | 256 different colours |
24 bit allows 16,777,216 different values | 6,777,216 different colours |
The greater the colour depth:
Bitmap Images
Bitmap Images
Bitmap Images
Indexed Colour
A colour palette is stored inside the image file as part of the meta data.
Advantages
Indexed colour saves a lot of memory, storage space, and transmission time
Disadvantages
Has a limited set of simultaneous colours per image, ok for 4 or 16 colour palettes but not for real life images.
Direct Colour
Every colour can be made up from the correct mix of RED, GREEN and BLUE
Direct Colour
By mixing the appropriate amount from each of the three colour channels you can get a variety of colours
| R | G | B | α |
| FF | FF | FF | 00 |
| 00 | 00 | 00 | 00 |
| 00 | 00 | FF | 00 |
| 80 | 00 | 96 | 00 |
| 96 | 00 | 80 | 00 |
| 00 | FF | 00 | 00 |
| FF | FF | 00 | 00 |
| 80 | 80 | 00 | 00 |
| FF | 00 | 00 | 00 |
There is a 4th channel, called the alpha channel which handles transparency
What gets stored for each pixel is just a combination of each channel
Eg
FFFFFF00 means the pixel is white
96008000 means the pixel is lilac
8 bit gives 256 colours
Real life colour needs 15 or 16 bits
24-bit or “truecolor “gives over 16.7 million colours