Bitmap Images
Understanding Bitmap Images
- Bitmap images are a type of digital image that uses a grid of individual pixels where each pixel has a specific colour.
- These images are called raster images, with each pixel represented by binary data for its colour depth.
- Pixel stands for ‘picture element’ and is the smallest controllable element of a picture on the screen.
- Bitmaps are resolution-dependent. The quality of a bitmap image is directly linked to the number of pixels used to create the image (also known as the image resolution).
- If you try to enlarge a bitmap image, it may become pixellated as there is finite resolution available which, when stretched, can lead to loss of clarity and detail.
Size of a Bitmap Image
- The size of a Bitmap image depends on the width and height of the image (the dimensions, measured in pixels) and the colour depth (the number of bits used to represent each pixel).
- Colour depth, also known as bit depth, determines how many colours are available to each pixel. A greater bit depth allows for more available colours and a higher-quality image.
- For example, a 1-bit colour depth would allow for 2 colour possibilities (black or white), while an 8-bit colour depth would allow for 256 colours.
- The formula to calculate the size of a bitmap image in bits is: image width in pixels * image height in pixels * colour depth.
Compression of Bitmap Images
- To reduce the amount of storage needed, bitmap images can be compressed; two major types of compression exist: lossless and lossy.
- Lossless compression reduces file size without losing any quality. The original image can be perfectly reconstructed from the compressed version.
- Lossy compression reduces file size significantly by removing data that is less important to the quality of the image. Some quality is lost and cannot be recovered.
- Common formats like JPEG use lossy compression, while PNG and GIF use lossless compression methods.
Metadata in Bitmap Images
- Bitmap images often contain metadata along with their pixel data.
- Metadata can provide useful details such as the photographs’ date of creation, the camera model used, resolution, and any editing software used on the image.