All data on a computer system is represented using binary patterns, which are sequences of 1s and 0s.
In
order to represent an image, one method is to store it as if it were a grid of coloured squares, with each
colour represented by a unique binary pattern. The image dimensions and the number of colours used
are factors that affect the size of the image file.
A pixel represents the smallest element of a bitmapped graphic: a single colour. As all data in a computer
is stored in 1s and 0s, each colour needs to have a binary code assigned to it.
Imagine an image that was captured using a digital camera. Each pixel is a representation of the colours
that were detected by the camera's sensor.
Image resolution refers to the clarity of an image as it appears on a screen or on paper.
When you zoom in to a bitmap image, the pixels are stretched into larger blocks. That’s why bitmap
images appear in poor quality when you enlarge them too much.
The number of bits used per pixel is called the colour depth. The greater the colour depth, the more
colours are available for an image.
The image resolution is the size of a bitmapped graphic in pixels. It is calculated by multiplying the width
(in pixels) by the height (in pixels) of an image.
To find the size of an image file, you multiply the resolution of the image by the colour depth: image file
size (in bits) = width (in pixels) × height (in pixels) × colour depth
This means that the size of an image file will increase if either the colour depth or the image resolution
increases.
When an image has a width of 8 pixels and a height of 8 pixels, with a colour depth of 4 bits, the
calculation is.
Calculate total bits: 8 × 8 × 4 = 256 bits
in addition to the pixel data, the file must store additional information so that the image can be
reproduced accurately. This additional data is called metadata, which means data about data. Examples
of metadata include:
Image dimensions (e.g. width in pixels, height in pixels)
File format
Date and time of creation
Geographical location of creation
Details about the device used to create the image
Camera settings
common file formats of bitmapped graphics are:
Bitmap – file extension is .bmp
PNG (Portable Network Graphic) – file extension is .png
JPEG (Joint Photographic Experts Group) – file extension is .jpg or .jpeg
GIF (Graphics Interchange Format) – file extension is .gif