3.3.6 - Bitmap pixels, colour depth and file size
Learn how a bitmap stores an image as pixels, how colour depth controls the available colours, and how dimensions and depth determine uncompressed image size.
Pixels and image dimensions
A bitmap represents an image as a rectangular grid of small picture elements, called pixels.
Pixel
A single point or picture element in an image, assigned one colour value.
The display combines these coloured points so we see a picture. Image dimensions are written as width × height in pixels. A 640 × 480 bitmap has 640 pixels across each row and 480 rows, giving pixels. These dimensions describe the image data, not its width in centimetres.
If you enlarge the same bitmap on a screen without adding new image detail, its pixels cover more display area and edges may appear blocky. An image recorded with more pixels can describe smaller details, but storing those extra pixels also requires more data when other factors stay the same.
Doubling only the width doubles the pixel count. Doubling both width and height multiplies it by four: a 1,280 × 960 image contains 1,228,800 pixels. The multiplication matters because there are now twice as many positions in every row and twice as many rows.
Bits per pixel
Colour depth is the number of bits used to represent the colour of each pixel.
With one bit per pixel there are two possible codes, 0 and 1, so two colours can be represented. Two bits allow four codes: 00, 01, 10 and 11. A palette might assign these to white, pale blue, grey and black. The codes have meaning only after the colour mapping is defined.
For a colour depth of bits per pixel, up to different colour codes are possible.
Four bits permit 16 colours; eight bits permit 256. Higher depth can represent a wider choice of colours and smoother colour changes, while using more bits for each pixel. It does not create more pixels or change the dimensions.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account