Pictures in Binary

Header Information

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