Representing images
Images are made up of picture elements or pixels. These are tiny squares that appear on a screen. Each pixelPicture element - a single dot of colour in a digital bitmap image or on a computer screen. has a binary representation. The more pixels per inch on the screen, the higher the resolution of the picture. However, the higher the image resolutionThe fineness of detail that can be seen in an image - the higher the resolution of an image, the more detail it holds. In computing terms, resolution is measured in dots per inch (dpi)., the more memory (number of bits) is needed to store the graphic.
You need a binary value for every unique colour in an image. If an image is black and white, then each pixel would be encoded as a 0 (for white) or a 1 (for black). The number of bits used for each pixel is called the colour depthThe amount of bits available for colours in an image..
In the example below, the space invader character has a colour depth of 2 bits, allowing us to encode 4 colours - 2 binary numbers, to the power of the number of bits (22 = 4). If the colour depth was eight bits, we could have a total of 256 colours (28 = 256).
Bitmap
Digital cameras, smartphones and websites regularly use bitmapAn image made up of pixels. This type of image loses quality if its width and/or height are increased. images.
A bitmap (map of bits) is a file format used to store digital images. Bitmap images are organised as a grid of coloured squares called pixels. Each different colour in the image is stored as a binary number.
When zooming in or enlarging a bitmap image, the pixels are stretched and made into larger blocks. The quality of bitmap images reduces as they are enlarged.
Vector
A vectorAn image stored as mathematical instructions for how to draw it. This means its width and height can be increased without the loss of quality. image, rather than using blocks of colour to produce an image, uses mathematical calculations. Shapes such as straight lines and curves become scalable, without reducing quality.
As you zoom in or enlarge the shape, lines remain crisp. Vectors are not used for photographs, but line drawings or fonts.
A vector is more efficient than a bitmap at storing large areas of the same colour because it does not need to store every pixel as a bitmap does. Because vector-based images are not made up of a specific number of pixels, they can be scaled to a larger or smaller size and not lose any image quality.
Vector graphics are used in CADComputer-aided design - the use of computers to assist in any of the phases of product design., desktop publishing and the fonts on your computer.