Storing Images
Storing Images
Concepts of Storing Images
- Digital images are made of tiny dots called pixels.
- Each pixel holds a value representing its colour.
- The resolution of an image is the total number of pixels in it – typically described in terms of the number of pixels in the horizontal and vertical dimensions.
- The more pixels an image has, the higher its resolution is and the more detail it contains.
Bitmap Images
- Bitmap images or raster graphics are made up of a grid of pixels where each pixel is assigned a specific location and colour value.
- They are called bitmap because they contain a map of bits, a reference to the colour of each pixel.
- The more pixels used in an image (density), the larger the file size – this is also known as the bit depth.
- High resolution images have high bit depth and thus produce larger files sizes.
- Poor scaling is a downside to bitmap images. If you zoom in too much or stretch it, the image becomes pixelated.
Vector Images
- Vector images are made up of paths, not pixels. These paths consist of a start and end point, along with other points, curves, and angles along the way.
- A path can be a line, square, triangle or a curvy shape – these paths make up objects.
- Each of these objects can be edited individually, without affecting other objects in the image.
- Because vector images are not resolution-dependent, they scale without losing quality or becoming pixelated.
- Vector images are resolution-independent and can be scaled to any size without losing clarity or detail.
- These images are ideal for logos, text, and simple illustrations that need to be scaled to different sizes.
Colour Depth
- The colour depth also known as bit depth refers to the amount of data stored for each pixel’s colour.
- In a monochrome (black and white) image, each pixel is represented by one bit (0 is black, 1 is white).
- An image with a colour depth of 1 bit can display 2^1 = 2 colours, i.e., black and white.
- An image with a colour depth of 8 bits can display 2^8 = 256 colours.
- The higher the bit depth of an image, the higher the number of tones (greys or colours) that can be displayed.
Importance of Image Compression
- Image compression is vital for reducing the size of an image file without degrading the quality of the image beyond an acceptable level.
- Lossless compression allows the original data to be perfectly reconstructed from the compressed data.
- Lossy compression permits reconstruction only of an approximation of the original data, with the potential for significant degradation if the image is compressed a lot. This is commonly used for internet image and streaming video transmission.
- Image compression can greatly reduce storage requirements, thus saving costs and enabling more efficient data transmission.