Pictures in Binary
- pictures
are converted to a series of squares aka pixels (picture elements)
- the
pixels are coloured in to create pictures
- more
pixels = a nicer more defined picture
- number
of pixels is the resolution of the picture
- on
printers pixels are called dots. the resolution of a printer is in dpi or
dots per inch
- When pictures are
encoded, they contain a string of numbers that has the colour number, then
how many pixels to colour in, then the next pixel colour, how many to fill
in.
Header Information
- This is information (in binary) that is provided in a standard order at
the beginning of a picture.
- The computer opens the file, reads the header information and gets ready
to draw the picture.
- The information at the end of the file is the part that shows how the pixels
are encoded and which pixels are coloured in.
- Header information includes details about how the file is stored, its dimensions
and what colours are needed (maybe in a colour lookup table)
Picture types
Black and White

Colour

Compressed (aka Block Art)

How many bits are needed?
You have a 20 pixel x 30 pixel picture which has 19 colours.
The header information takes 64 bits of space.
(a) Determine how many bits are needed for one pixel.
4 bits will store 16 colours, 5 will store 32. Since we
have 19 colours, we will need 5 bits per pixel.
(b) Determine how many pixels.
20 x 30 = 600
(c) Determine the bits for the picture
number of pixels x bits per pixel = 600 x 5 = 3000
(d) Add on the headerinformation
3000+64=3064 bits