Lesson Objective
- Explain how images are made up of pixels and how each pixel is represented in binary.
- Calculate the file size of an image.
KS3, GCSE, A-Level Computing Resources
A bitmap image, also known as a raster graphic, is a digital image composed of a grid of pixels. Each pixel in this grid represents a specific color, and together they form the image. When viewed at 100%, each dot corresponds to an individual pixel on a display. In a standard bitmap image, each dot can be assigned a different color, allowing it to represent any type of rectangular picture. However, if you zoom into a bitmap image, regardless of the file format, it will look blocky because each dot will take up more than one pixel. Therefore, bitmap images appear blurry when enlarged. Unlike vector graphics, which are composed of paths instead of dots, bitmap images cannot be scaled without reducing their quality.
Pixel - Small dot of colour on an image
Resolution - Amount of pixels on an image. Low-resolution images have larger pixels and appear blocky or pixelated. High-resolution images have more pixels and look better when enlarged.
Colour/Bit Depth - Amount of bits in each pixel (amounts of colours available)
Here is a 1 bit image of a kind of sad face...
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Color depth determines the number of unique colors an image can display.
Each pixel in an image is assigned a specific color, and the number of bits allocated to each pixel defines the available color range. For example:
Digital images consist of a grid of tiny squares called pixels. Each pixel corresponds to a specific color value. The combination of pixels creates the overall image.
Higher bit depth allows for more colors per pixel. Adding more bits exponentially increases the color possibilities:
Image size is dependent on the resolution and the colour depth of an image. You can calculate image file size using the following formula: File Size (Bits) = Resolution x Bits per Pixel
Metadata includes information about the file itself (e.g., creation date) and the image data (e.g., dimensions).