44 total
By the end of this subtopic, you should be able to:
A bitmapped image is an image made from tiny squares called pixels. A pixel is the smallest part of a picture that can be stored on a computer screen. When you look at a photo normally, the pixels are usually too small to notice. But if you zoom in a lot, you may start to see the image as a grid of little coloured squares.
A bitmap stores the image by saving the colour of each pixel. This means the computer keeps a record of every tiny part of the image. Because of this, bitmap images are very good for detailed and realistic pictures such as photographs.
You can imagine a bitmap as a large table or grid. Each box in the grid is one pixel. Every pixel has a binary value stored for it, and that binary value tells the computer what colour to show.
To store the colour of each pixel, the computer uses bits. The number of bits used for one pixel is called the colour depth or bit depth of the image.
A bigger bit depth means more possible colours can be stored. This usually gives a better-looking image because colour changes can be shown more smoothly.
For example:
The number of colours can be found using:
Number of colours = 2^n
where n is the number of bits per pixel.
So if an image uses 8 bits per pixel:
2^8 = 256 colours
If it uses 24 bits per pixel:
2^24 = 16,777,216 colours
This is why photos often use a high bit depth. A photo needs many colours and shades to look realistic. A simple icon or logo may not need as many colours.
Image resolution means how many pixels make up the image. It is usually written as:
width × height
For example, an image might be 1920 × 1080 pixels.
To find the total number of pixels:
1920 × 1080 = 2,073,600 pixels
A higher image resolution means there are more pixels in the image. More pixels usually means more detail, so the image looks sharper and clearer.
A lower image resolution means fewer pixels. This reduces detail. If the image is enlarged, it may look blocky or blurry. This effect is called pixelation.
Screen resolution means the number of pixels that a screen can show across and down.
For example, a screen may have a resolution of 1366 × 768 or 1920 × 1080.
Screen resolution is important because the screen must have enough pixels to display the image properly. If the image resolution is bigger than the screen resolution, the whole image may not fit properly on the screen. The computer may need to reduce the image size, crop part of it, or show it with lower quality.
So:
These are related, but they are not the same thing.
Another important idea is pixel density. This means how many pixels are packed into a certain area of the screen. A higher pixel density gives a sharper image because the pixels are packed closely together. A lower pixel density makes pixels easier to notice, which lowers image quality.
Even if two screens have the same resolution, the smaller screen can look sharper because the same number of pixels are packed into a smaller space.
A bitmap image file also contains a file header. This is information stored at the start of the file. The file header does not store the picture itself. Instead, it stores details about the image so the computer knows how to open and display it.
A file header may include:
Without this information, the computer would not know how to read the image data properly.
To estimate the size of a bitmap image, you need to know:
The basic method is:
File size in bits = image resolution × bit depth
Then:
File size in bytes = bits ÷ 8
Find the file size of an image with:
Step 1: find the total number of pixels
1920 × 1080 = 2,073,600 pixels
Step 2: multiply by bit depth
2,073,600 × 24 = 49,766,400 bits
Step 3: convert bits to bytes
49,766,400 ÷ 8 = 6,220,800 bytes
So the estimated file size is 6,220,800 bytes, which is about 6.22 MB if using decimal units.
A bitmap image section is 10 pixels wide and 5 pixels high. The complete image can use 256 colours.
First, work out the bit depth.
Since:
256 = 2^8
the image needs 8 bits per pixel.
Now find the number of pixels:
10 × 5 = 50 pixels
Now find file size in bits:
50 × 8 = 400 bits
Convert to bytes:
400 ÷ 8 = 50 bytes
So the estimated size of this section is 50 bytes.
There is always a trade-off between image quality and file size. A trade-off means improving one thing often makes another thing worse.
If image resolution increases:
If image resolution decreases:
If a low-resolution image is enlarged, the pixels become easier to see. This makes the image look rough or blocky.
If colour depth increases:
If colour depth decreases:
So both higher resolution and higher bit depth improve quality, but both also increase file size.
A vector graphic is not made from pixels. Instead, it is made from mathematical descriptions of shapes.
A vector image stores objects such as:
Each shape is stored using instructions. For example, to store a circle, the computer can save the centre point and the radius. It does not need to save every tiny part of the image one pixel at a time.
This is why vector graphics are usually much smaller in file size than bitmap images.
To understand how vector graphics are encoded, you must know these three terms.
A drawing object is a shape or item in the image, such as a line, circle, rectangle, or curve.
A property is a feature of the object, such as:
A drawing list is the list of all the instructions used to build the image. It tells the computer which objects to draw and what properties each object has.
For example, a vector file could store instructions like this:
The computer reads the drawing list and creates the image on the screen.
Vector graphics can be made bigger or smaller without losing quality. This is because the image is based on shapes and maths, not on fixed pixels.
If you enlarge a bitmap, the pixels get bigger and the image may become pixelated. If you enlarge a vector image, the computer simply redraws the shapes at the new size. The edges stay smooth and clear.
This makes vector graphics ideal for images like logos, icons, and diagrams that may need to be resized.
A bitmap image is best when the image needs lots of realistic detail, such as a photograph. A vector graphic is best when the image is made of shapes and may need resizing, such as a logo.
Here is the main difference:
Bitmap image
Vector graphic
When deciding whether to use a bitmap or vector image, think about the task.
Use a bitmap image when:
Use a vector graphic when:
For example, a company logo should usually be stored as a vector graphic. This is because the same logo may be used on a website, a pen, a poster, or a billboard. It must stay sharp at every size.
A family holiday photo should usually be stored as a bitmap image. This is because the image contains natural detail, shading and texture, which bitmap images can store well.
Sound in the real world is analogue. This means it changes continuously. The sound wave is smooth, not broken into separate steps.
Computers cannot store analogue data directly. A computer works with digital data, which means data stored in binary form using 0s and 1s.
So if a computer wants to store sound, the analogue sound wave must be converted into digital form. This is done by taking measurements of the sound wave.
The process of measuring the sound wave at regular time intervals is called sampling.
When a sound is sampled, the computer checks the amplitude of the wave at many different points. Amplitude means the height of the wave and is linked to loudness. A bigger amplitude means a louder sound.
Each measured value is then stored as binary.
So the main idea is:
This allows the computer to create a digital version of the original sound.
Sampling rate means the number of samples taken each second.
It is measured in Hertz (Hz).
For example:
A higher sampling rate means the computer takes more measurements each second. This makes the digital sound a closer match to the original analogue sound.
A lower sampling rate means fewer measurements are taken. This makes the digital sound less accurate.
So:
Sampling resolution is the number of bits used to store each sample.
This is sometimes also called bit depth in sound.
If more bits are used, the computer can store more possible amplitude values. This means the sound wave can be recorded more accurately.
For example, if only a small range of values is possible, the recorded sound is less exact. If a larger range of values is possible, the recording is more precise.
A higher sampling resolution gives:
A lower sampling resolution gives:
Suppose a sound wave uses amplitude values from 0 to 10.
To store values up to 10, 4 bits are enough, because 4 bits can represent values from 0 to 15.
If the amplitude value is 9, then in binary it is:
1001
This shows how one sampled amplitude can be stored in binary.
If a much larger range of amplitude values is used, then the sound can be stored more accurately, but more bits are needed for each sample.
The quality of digital sound depends mainly on:
If both are high, the stored sound is closer to the original sound wave.
If one or both are low, the sound becomes less accurate.
This is why high-quality audio files are larger. More detail is being stored.
It is very important to understand the effect of changing these values.
If sampling rate increases:
If sampling rate decreases:
If sampling resolution increases:
If sampling resolution decreases:
To get the best sound, you would use a high sampling rate and a high sampling resolution. But this gives a large file size.
To save storage space, you could use lower settings. But then the sound will be less accurate.
So, just like images, sound also involves a trade-off between quality and file size.
Analogue data — data that changes continuously, like a real sound wave.
Bit depth — the number of bits used to store one item of data, such as a pixel in an image or a sample in a sound file.
Bitmap image — an image made from pixels.
Colour depth — the number of bits used to store the colour of one pixel.
Digital data — data stored in binary form using 0s and 1s.
Drawing list — the full set of instructions used to create a vector image.
Drawing object — one shape in a vector image, such as a line, circle or rectangle.
File header — information at the start of a file that describes the file, such as its type, size and resolution.
Image resolution — the total number of pixels in an image, usually shown as width × height.
Pixel — the smallest picture element in an image.
Pixel density — how closely packed the pixels are on a screen.
Property — a feature of a drawing object, such as position, size or colour.
Sampling — measuring a sound wave at regular time intervals.
Sampling rate — how many sound samples are taken per second.
Sampling resolution — the number of bits used to store each sound sample.
Screen resolution — the number of pixels a screen can display.
Vector graphic — an image made from shapes and mathematical instructions instead of pixels.
A student says, “A bitmap image is just a picture saved on a computer.” Explain more fully how a bitmap image is encoded.
Model answer:
A bitmap image has a resolution of 800 × 600 pixels and a colour depth of 8 bits. Estimate the file size in bytes. Show your working.
Model answer:
Explain how changing image resolution and colour depth affects the quality and file size of a bitmap image.
Model answer:
A company needs an image for its logo. The logo will be used on a website, on business cards and on a large billboard. State which type of image should be used and justify your answer.
Model answer:
Explain what is meant by sampling rate and sampling resolution when sound is stored on a computer, and explain the effect of increasing them.
Model answer:
Sign in to view full notes