1.2-Multimedia-Notes-By-EMK_2
1.2-Multimedia-Notes-By-EMK_2
1.2-Multimedia-Notes-By-EMK_2
2 Multimedia Notes
Objective:
Show understanding of how data for a bitmapped image are encoded.
Use and understand terms: pixel, file header, image resolution, screen resolution, colour
depth, bit depth.
Perform calculations to estimate file size for a bitmap image.
Show understanding of effects of changing elements of a bitmap image on image quality and
file size. Use the terms: image resolution, colour depth
Show understanding of how data for a vector graphic are encoded. Use terms: drawing
object, property, drawing list.
Justify use of a bitmap image or a vector graphic for a given task.
Show understanding of how sound is represented and encoded. Use terms: sampling,
sampling rate, sampling resolution, analogue and digital data
Show understanding of impact of changing sampling rate and resolution. Impact on file size
and accuracy.
Graphics
Images can be stored in a computer in two common formats:
➢ Bit-map image
➢ Vector graphic.
Bit-Map Images
Bit-map images are made up of pixels (picture elements). Image is stored in a two
dimensional matrix of pixels. Each pixel can be small rectangle, a small circle or a dot.
Picture element (pixel) are smallest identifiable component of a bitmap image, defined
by just two properties: its position in the bitmap matrix and its colour.
Bitmaps are also known as pixelmaps or raster graphics.
Use: Bitmap images are widely used on digital cameras, smartphones and online.
Simplest scheme used to represent the colour option is to use one bit to represent the
colour, so that the pixel is either black or white.
Greyscale
At least 8 bits ( per pixel are needed to code coloured image, this will gives 256
possible colours by varying the intensity of the blue, green and red elements.
True colour requires 3 bytes per pixel (24 bits), which gives more than one
million colours.
Colour Depth:
Number of bits used to represent one pixel is known as colour depth.
Colour depth of 8 bits per pixel provides 256 different colours. When colour depth
increases, number of possible colours which can be represented also increases.
Bit Depth:
Bit depth is number of bits used to store each of red, green and blue primary
colours in RGB colour.
When bit depth increases, number of possible colours which can be represented also
increases. A bit depth of 8 bits (28) per primary colour (Red , Green , Blue ) provides
256 × 256 × 256 = 16 777 216 different colours.
If a lower bit depth is used, image will show bands of colour.
Note: Colour depth and bit depth term can be used interchangeably.
Image resolution:
It is number of pixels in bitmap file defined as product of width and height values.
Screen Resolution:
Product of width and height values for number of pixels that the screen can display.
If screen resolution is smaller than image resolution then whole image cannot be
shown on screen or the original image will now be a lower quality.
Pixel Density:
Number of pixels per square inch is known as pixel density.
ESQ: Why bitmap image quality become poor during zooming?
Bitmap images are organized as a grid of coloured squares called pixels. Image is therefore
scalable but when image is scaled the number of pixels in it does not change. When
zooming in or enlarging a bitmap image, pixels are stretched and made into larger blocks.
This is why bitmap images appear as poor quality when enlarged too much. Enlarging a
bitmap image causes it to look blocky and "pixelated."
File Size:
Large file occupies more memory space and takes longer to display or
to be transmitted across a network.
Calculating size of a Bitmap Graphic:
Consider that a bitmap graphic is needed to fill a laptop screen where
resolution is 1366 by 768. If colour depth is 24 then number of bits we need is:
1366 × 768 × 24 = 25 178 112 bits
Example:
Calculate minimum size of bitmap file. Bitmap is to use a bit depth of 8 and bitmap is
to be printed with 72 dpi (dots per inch) and to have dimensions 5 inches by 3 inches.
Solution:
To find number of bits per pixel in image we need to know value of colour depth or bit
depth. In this case we know value of bit depth. i.e 8 bit which means 8 bits for each of RGB
components, so 24 bits are needed for one pixel.
ESQ: Why bitmap file size is larger than the size of the graphic alone?
A bitmap file store pixel data that defines the graphic and also have a file header that
contains information on how the graphic has been constructed.
Vector graphics can be designed using computer aided design (CAD) software or using
an application which uses a drawing canvas on the screen.
A vector graphic will contain a drawing list (included in file header) that is made up of
The command used for each object that makes up the graphic image.
The attributes that define the properties that make up each object
The relative position of each object will also need to be included.
The dimensions of each object are not defined, but the relative positions of
objects to each other in the final graphic need to be defined; this means that
scaling up the vector graphic image will result in no loss of quality.
A vector graphic file will have a smaller size than a corresponding bitmap file.
Vector graphic file can only be displayed directly on a graph plotter, which is an
expensive specialised piece of hardware. For the image to appear correctly on other
types of display, vector graphic file often has to be converted to a bitmap.
A digital camera automatically produces a bitmap. A bitmap file is the choice for
insertion of an image into a document, publication or web page.
Sound
Sound cannot travel in a vacuum. It requires a medium to travel. It is transmitted by
causing oscillations of particles within medium. Human ear picks up these oscillations
(changes in air pressure) and interprets them as sound.
Each sound wave has frequency and wavelength; amplitude specifies loudness of
sound. Amplitude of sound varies in a continuous but irregular pattern.
Does the image need to be resized? If so, a vector graphic could be the best option.
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
Sampling Resolution is number of bits used to store each sample. Larger sampling
resolution will mean there are more values available to store each sample. Larger
sampling resolution will improve accuracy of digitised sound and decrease distortion
of sound. Increased sampling resolution means a smaller quantization error.
Sampling Rate is number of samples taken per second. Increasing sampling rate will
increase accuracy / precision of digitised sound. Increasing sampling rate will result in
smaller quantisation errors.
Sampling rate should be in accordance with Nyquist’s theorem which states that sampling
must be done at a frequency at least twice highest frequency of the sound in sample.
Higher sampling rate and/or sampling resolution, greater the file size and will result in a
more faithful representation of original sound source.
16-bit sampling resolution is used when recording CDs to give better sound quality.
***************************
Exam Style Question
ESQ:1 Photographs has a bit depth of 8 bytes and image resolution of 1500 pixels
wide and 3000 pixels high. Calculate file size of photograph in megabytes. Jun 23 P11
Ans: Total Pixel = 1500 * 3000 = 4500000
image Size = (4500000 * 8 )/1000 /1000 = 36 MB
ESQ# 3: Camera detector has an array of 1920 by 1536 pixels. Colour depth of 16bits
is used. Calculate size of photograph , giving your answer in MiB.
Ans: 1920 × 1536 = 2 949 120 pixels
colour depth = 16
16 × 2 949 120 = 47 185 920 bits
bits (÷ 8) → 5 898 240 bytes → (÷ (1024 × 1024)) → 5.625 MiB
ESQ #4 Photographs have been taken by a smartphone which uses a detector with a
1024 × 1536 pixel array. Software uses a colour depth of 24bits. How many
photographs could be stored on 16GiB memory card?
ANS: 1024 × 1536 = 1 572 864 pixels
colour depth = 24 → 24 × 1 572 864 = 37 748 736 bits
bits (÷ 8) → 4 718 592 bytes → 16 GiB = 17 179 869 bytes
number of photos = (17 179 869)/(4 718 592) = 3640 photos
ESQ#4: Audio is being sampled at the rate of 44.1 kHz using 8 bits. Two channels
(Stereo) are being used. Calculate: the size of a 30-second audio recording in MiB.
ANS: file size = 44 100 × 8 × 30 × 2 (two tracks) = 21 168 000 bits
21 168 000 bits (÷ 8) → 2 646 000 bytes → 2646000 / (1024 *1024) = 2.5 MiB