Understand how data for a bitmapped image are encoded
Perform calculations to estimate file size for a bitmap image
Understand effects of changing elements of a bitmap image
Understand how data for a vector graphic are encoded
Justify use of bitmap image or vector graphic for a given task
Understand how sound is represented and encoded
Understand impact of changing sampling rate and resolution
1.1 Introduction to Graphics
Images are an important type of data that computers handle. To process and display images, computers must represent them in a digital form using binary numbers.
Images can be stored in a computer in two common formats:
🌟 Did You Know?
The word "pixel" is a combination of "picture" and "element". It was first used in 1965 by Frederic C. Billingsley at NASA's Jet Propulsion Laboratory!
1.2 Bitmap Images
📖 Definition: Bitmap Image
A bitmap image is made up of pixels (picture elements). The image is stored in a two-dimensional matrix of pixels. Each pixel can be a small rectangle, a small circle, or a dot.
📖 Definition: Pixel
A pixel is the smallest identifiable component of a bitmap image, defined by just two properties:
Its position in the bitmap matrix
Its colour
Bitmaps are also known as pixelmaps or raster graphics.
How Bitmap Images Work
💡 Exam Tip
When asked about bitmap images in exams, always mention that they are made up of pixels and each pixel has a defined position and colour. This is the key distinction from vector graphics!
1.3 Colour Depth & Bit Depth
📖 Definition: Colour Depth
Colour depth is the number of bits used to represent the colour of each pixel. It determines how many different colours can be displayed.
📖 Definition: Bit Depth
Bit depth is the number of bits used to store each of the red, green, and blue primary colours in an RGB colour model.
The simplest scheme uses 1 bit per pixel (black or white). More bits allow more colours:
Colour/Bit Depth
Number of Colours
Example Use
1 bit
21 = 2
Black & White
4 bits
24 = 16
Simple graphics
8 bits
28 = 256
GIFs, retro games
16 bits
216 = 65,536
High colour
24 bits (True Colour)
224 = 16,777,216
High-quality images
32 bits
232 = 4,294,967,296
Professional graphics
Formula: Number of Colours = 2n where n = colour depth (bits per pixel)
⚠️ Common Mistake
Don't confuse colour depth with bit depth!
Colour depth = total bits per pixel (e.g., 24 bits for True Colour)
Bit depth = bits per RGB channel (e.g., 8 bits for each of R, G, B)
So 8-bit depth × 3 channels = 24-bit colour depth
🌟 Did You Know?
If a lower bit depth is used, images will show bands of colour instead of smooth gradients. This is called "banding" or "posterization".
1.4 Image Resolution & Screen Resolution
📖 Definition: Image Resolution
Image resolution is the number of pixels in a bitmap file, defined as the product of width and height values.
Example: An image with 1920 × 1080 pixels has 2,073,600 total pixels.
📖 Definition: Screen Resolution
Screen resolution is the product of width and height values for the number of pixels that a screen can display.
Example: A 4K display has 3840 × 2160 pixels.
📖 Definition: Pixel Density
Pixel density is the number of pixels per square inch (PPI - Pixels Per Inch). Higher PPI means sharper display.
Calculating Pixel Density (PPI)
Example: Calculate pixel density for an iPhone 8 with 5.5-inch screen and resolution 1920 × 1080:
When image resolution is higher than screen resolution, the image must be either:
Scaled down (removing pixels, may lose quality)
Cropped (showing only part of the image)
Displayed at full size (user must scroll to see all)
⚠️ Important
Why does bitmap image quality become poor during zooming?
When zooming in on a bitmap, the number of pixels stays the same but each pixel is stretched to cover a larger area. This causes the image to look blocky and pixelated.
A file header is a set of bytes at the beginning of a bitmap file which identifies the file type and contains metadata about the image.
File header contains:
File type (.bmp, .jpg, etc.)
File size
Image resolution (width × height)
Colour depth / bit depth
Compression type used
⚠️ Common Mistake
Remember: The bitmap file size is larger than the size of just the graphic data because it also includes the file header!
1.6 Vector Graphics
📖 Definition: Vector Graphic
A vector graphic is an image made up of mathematical shapes such as straight lines and curves, using coordinates and geometry to precisely define the parts of the image.
When a vector graphic is displayed, the file is read and calculations are made to draw the objects. If the user resizes the image, the file is read again and new calculations are made - this is why quality is preserved!
1.7 Bitmap vs Vector Graphics
Feature
Bitmap Images
Vector Graphics
Composition
Made of tiny pixels
Made of mathematical shapes
Scalability
Loses quality when resized (pixelates)
Can be resized infinitely without quality loss
File Size
Large (depends on resolution)
Smaller (uses formulas, not pixels)
Best For
Photographs, complex textures
Logos, icons, diagrams
Editing
Edit individual pixels
Edit shapes and properties
Realism
Very realistic
Less realistic (cartoon-like)
File Formats
.jpg, .png, .bmp, .gif
.svg, .ai, .eps, .cgm, .odg
When to Use Bitmap Images
Photographs: Digital photos where every pixel contains colour information
Complex Art & Textures: Images with shading, gradients, and textures
Realistic Images: Real-world scenes captured by cameras
Web Images: When inserting images into documents or web pages
When to Use Vector Graphics
Logos: Must be resized for different purposes (business cards to billboards)
Icons: Need to appear sharp at different sizes (apps, websites)
Architectural/Engineering Designs: CAD drawings that need precise scaling
🌟 Did You Know?
Vector graphic files can only be displayed directly on a graph plotter. For most displays, they must be converted to bitmap first. This is called rasterisation.
2.1 Sound Representation
📖 Key Concepts
Sound cannot travel in a vacuum - it requires a medium. It is transmitted by causing oscillations of particles within the medium.
The human ear picks up these oscillations (changes in air pressure) and interprets them as sound.
📖 Definition: Analogue vs Digital
Analogue data is data obtained by measurement of a physical property which can have any value from a continuous range of values.
Digital data is data that has been stored as a binary value which can have one of a discrete range of values.
How Sound is Encoded
📖 Definition: Sampling
Sampling is the process of taking measurements at regular intervals and storing the value. Each sample records the amplitude of the sound wave at that point in time.
💡 Exam Tip
Remember the two components of a sound encoder:
Band-limiting filter - removes very high frequencies that human ear cannot detect (would cause coding problems)
ADC (Analogue-to-Digital Converter) - converts analogue data to digital binary values
2.2 Sampling Rate & Sampling Resolution
📖 Definition: Sampling Rate
Sampling rate is the number of samples taken per second, measured in Hertz (Hz).
Example: 44.1 kHz (CD quality) = 44,100 samples per second
📖 Definition: Sampling Resolution
Sampling resolution (also called bit depth) is the number of bits used to store each sample's amplitude.
Example: 16-bit resolution allows 216 = 65,536 possible amplitude values
Or for decimal: 1 KB = 1000 bytes, 1 MB = 1,000,000 bytes
Exam-Style Questions
Q1. A photograph has a bit depth of 8 and image resolution of 1500 pixels wide and 3000 pixels high. Calculate the file size of the photograph in megabytes (MB). [3 marks]
Mark Scheme:
Bit depth of 8 means 8 bits for each RGB channel → 24 bits per pixel (colour depth) ✓
Total pixels = 1500 × 3000 = 4,500,000 pixels ✓
File size = 4,500,000 × 24 = 108,000,000 bits ✓
Convert to bytes: 108,000,000 ÷ 8 = 13,500,000 bytes
Convert to MB: 13,500,000 ÷ 1,000,000 = 13.5 MB ✓
Additional points: If using MiB (1024-based), answer would be ~12.9 MiB. Always check if question asks for MB or MiB.
Q2. Describe how sound is represented in a computer. [4 marks]
Mark Scheme:
Sound is analogue and must be converted to digital ✓
Amplitude is recorded/sampled at set intervals ✓
Each amplitude value is converted to a binary number ✓
Binary values are stored in sequence ✓
Higher sampling rate = more samples per second = better quality
Higher resolution = more bits per sample = more accurate amplitude
Analogue-to-Digital Converter (ADC) used for conversion
Q3. A camera detector has an array of 1920 by 1536 pixels. Colour depth of 16 bits is used. Calculate the size of the photograph, giving your answer in MiB. [3 marks]
Mark Scheme:
Total pixels = 1920 × 1536 = 2,949,120 pixels ✓
Total bits = 2,949,120 × 16 = 47,185,920 bits ✓
Bytes = 47,185,920 ÷ 8 = 5,898,240 bytes
MiB = 5,898,240 ÷ (1024 × 1024) = 5.625 MiB ✓
Q4. Photographs have been taken by a smartphone which uses a detector with a 1024 × 1536 pixel array. Software uses a colour depth of 24 bits. How many photographs could be stored on a 16 GiB memory card? [4 marks]
Number of photos = 17,179,869,184 ÷ 4,718,592 ≈ 3,640 photos ✓
Note: Real-world answer would be less due to file headers, metadata, and file system overhead.
Q5. Explain the difference between a bitmap image and a vector graphic. Give one example of when each would be the best choice. [5 marks]
Mark Scheme:
Bitmap: Made up of pixels arranged in a grid/matrix ✓
Each pixel has defined position and colour ✓
Loses quality when scaled up (pixelates) ✓
Vector: Made up of mathematical shapes/formulas ✓
Stores drawing list with commands and properties ✓
Can be scaled infinitely without quality loss ✓
Bitmap best for: Photographs, complex textures, realistic images ✓
Vector best for: Logos, icons, diagrams, technical drawings ✓
Q6. A company needs to create a logo that will be used on both business cards and billboards. Justify whether they should use a bitmap or vector graphic. [4 marks]
Mark Scheme:
Should use a vector graphic ✓
Logo needs to be displayed at very different sizes (small card, large billboard) ✓
Vector graphics can be scaled infinitely without quality loss ✓
Bitmap would pixelate/become blurry when enlarged for billboard ✓
Vector files are typically smaller for simple logo designs ✓
Vector allows easy editing of colours and shapes ✓
Exam-Style Questions (continued)
Q7. Audio is being sampled at the rate of 44.1 kHz using 16 bits. Two channels (stereo) are being used. Calculate the size of a 30-second audio recording in MiB. [4 marks]
This additional data increases total file size beyond just the graphic data
Q9. What is meant by the term "sampling resolution" when referring to sound files? Explain how increasing the sampling resolution affects the quality and file size of a sound recording. [4 marks]
Mark Scheme:
Definition: Sampling resolution is the number of bits used to store each sample/amplitude value ✓
Effect on quality: Higher resolution = more possible amplitude values = more accurate representation = less distortion/quantisation error ✓
Effect on file size: Higher resolution = more bits per sample = larger file size ✓