STIG: Bitmap AS-Level

Last updated 6 months ago
6 questions

BITMAP IMAGES AKA RASTER IMAGES



is made up of tiny squares called pixels (short for "picture elements"). Each pixel represents a single color, and the collection of these pixels forms the entire image.
1

What's the definition of a pixel?

Each pixel has a specific color, determined by a certain amount of data, and when viewed together, all pixels create the visual image you see on the screen.

When you save a bitmap image, the file contains not just the image data (the pixels) but also some additional information in what is called the file header. The file header includes metadata about the image, such as:
  • File size: The total size of the image file.
  • Dimensions: The width and height of the image in pixels.
  • Color depth: The number of bits used to represent the color of each pixel.
  • Compression method (if any): How the image data is stored to reduce file size.
Image resolution refers to the total number of pixels in the image, typically expressed as width x height (e.g., 1920x1080).

A higher resolution means more pixels, which usually results in a sharper and more detailed image but file size is larger.

We then finally need to use the bit depth in the calculation so we have

width x height x bit depth
1

Calculate the image resolution (without bit depth) for an image which has 400 Height and 200 Width (pixels).

Color depth, also known as bit depth, refers to the number of bits used to represent the color of a single pixel.
  • For example, with a color depth of 1 bit, a pixel can only be black or white (2 colors).
  • With 8 bits, a pixel can represent 256 different colors.
  • With 24 bits (commonly used in true color images), a pixel can represent over 16 million colors (because each color—red, green, and blue—is represented by 8 bits, allowing for 256 shades of each).

i.e. if we have an image with 3 pixels width and 3 pixels height, and it is using 2-bits for bit depth

3x3x2

If we have an image of 3 pixels width and 3 pixels height, and it is using 15 colours - we need to convert this to bit depth

3x3x?

15 colours would need at least 16 values which would be 4-bits soooo

3x3x4
When a bitmap image is created or saved, each pixel's color data is encoded according to the image’s color depth and is then organized in a sequence that corresponds to the image's layout.

The file header comes first in the file, followed by the pixel data. The pixel data consists of values representing the color of each pixel, arranged row by row from top to bottom.
1

Imagine a simple 2x2 bitmap image with 24-bit color depth. How many bytes would this take up on your hard drive?

1

What would be the correct order of an image when it has been encoded?

  1. Header
  2. Pixel Data
1
Draggable itemCorresponding Item
Pixel
An image composed of a grid of pixels, where each pixel represents a single color.
File Header
An image composed of a grid of pixels, where each pixel represents a single color.
Encoding
The smallest element of an image that contains color information.
Raster Image
The section at the beginning of an image file that contains metadata about the image, such as its size, resolution, color depth, and compression method.
Bit Depth
The total number of pixels in an image, expressed as width x height
Compression Method
The number of bits used to represent the color of each pixel, determining how many colors can be displayed.
Bitmap Image
The process of converting an image into a digital format that can be stored and interpreted by a computer, involving the arrangement of pixel color data according to the image’s layout and color depth.
Image Resolution
A technique used to reduce the size of an image file by encoding the image data more efficiently.
Screen resolution refers to how many pixels a display can show. Like image resolution, it is also expressed as width x height (e.g., 1920x1080). If an image has a higher resolution than the screen, it may need to be scaled down to fit.
1

University Challenge:
Problem:You have an image with a resolution of 3840x2160 pixels (4K resolution). Your computer screen has a resolution of 1920x1080 pixels (Full HD). If you display the image at its full resolution, will it fit on the screen without scaling? If not, by what factor will the image need to be scaled down?