You are on page 1of 7

9618 – Chapter 1 Notes

1.2 Multimedia

Image
A digital image is a representation of a real image as a set of numbers that can be
stored and handled by a digital computer.

A digital image is a matrix of many small elements, or pixels.

Each pixel is represented by a numerical value. In general, the


pixel value is related to the colour that it stores

A large part of using modern computers involves sending


pictures and films to each other, along with using a graphical
user interface. All of this involves computers saving and processing
images. This section will cover the two main image types: vector
and bitmap, along with some compression techniques.

Bitmap -a collection of pixels from an image mapped to specific memory locations


holding their binary colour value. It uses RGB colour encoding to represent a
colour.

Pixel-the smallest possible addressable area defined by a solid colour, represented


as binary, in an image. One pixel contains one solid colour

Image Resolution-how many pixels an image contains per inch/cm.

Screen Resolution-the number of pixels per row by the number of pixels per
column.
Colour Depth
Different images can store different numbers of colours. A simple black and white
image only needs to store two colours, black and white, and so an image could
store the colours as a simple binary sequence.

The following binary sequence could be used to store this simple picture of a fish.

The following binary sequence could be used to store this simple picture

0001 0000 1001 1001 1101 1100 1111 0110 1111 1110 1101 1100 1001 1000 0001 0000

However, if we want to add more colours, we need to start increasing the number of
bits used for each pixel. For instance, if we want each pixel to be one of four different
colours, we would need to represent each pixel as one of four different values. We can use
a 2-bit binary number to do this, with the values 00, 01, 10 and 11. The colour of each pixel
will be represented by one of these four binary codes. For instance, if 11 is black, 10 is
green, 01 is red and 00 is white:
Here is an example of an image represented by 4 colours.

This time the binary representation would be twice as long.

0000 0011 0000 0000 0100 0011 1100 0010 0101 0011 1111 0000 0101 0111 1011 1100 0101
0111 1111 1100 0101 0011 1111 0000 0100 0011 1100 0000 0000 0011 0000 0000

Knowledge Check
What number is used to represent Orange?

What number is used to represent Yellow?

What number is used to represent Blue?

The number of bits used to store each colour is called the colour depth.

In the above example the colour depth is 2

The colour depth determines how many colours can be represented on an image.

With a colour depth of n bits, a computer can represent 2𝑛 different colours.

For example, if the colour depth is 1 bit, there are only 21 = 2 possible colours - black
and white, whereas if is is 24 bits, there are 224 = 16,777,216 possibilities.
Effect of Colour Depth on Image quality and file size
is the number of bits used per pixel. The more bits per pixel, the larger the range of colours
we can have in the image. The more colours we have available, the better the
representation of the image. However, the more colours we have, the more bits per pixel we
need. This means that more data is required to store each pixel. Consequently, the higher
the colour depth, the larger the file needed to store the image.

Look at the following image of a sign in Portmeirion. The original image has a bit depth of 8,
which is 28 or 256 colours, and is 1.2 MB in size. As we reduce the number of colours
available the image become less well defined but the size of the file reduces, to 787 kB for
eight colours and 542 kB for four colours

Calculating bitmap image size


To calculate the size of an image file, we need to know the colour depth and the width and
height of the image in pixels.
File size = colour depth × image height (px) × image width (px)
RGB Values
In general, photos use 3 bytes to
store the colour of each pixel by
using the number 0-255 __to
represent the amount of each of
Red, Green and Blue in the colour -
the __RGB values. By mixing these
three colours with different
intensities, a computer display is
able to show over 16 million different
colours.

Here are some of the colours that can be made using different RGB values:
Metadata
You will have noticed that in the questions asking about the file size, it mentioned
the minimum file size required. This is because when images are stored, the
computer needs to know how it is meant to display them.

For example, if it had a string of 24 bits, it might be a 4 x 6 image with a 1-bit colour
depth, or perhaps a 2 x 6 image with a 2-bit colour depth.

Therefore the minimum information the computer needs to process the image is the
width, height and colour depth. However, it may also need to know things such as
what colours are given what values, when the photo was taken, or even where. This
information is all known as metadata and takes up storage space in the image file.

Vector Graphics
Vector graphics are images that are made up of lists of objects and their properties.
An object is a mathematically or geometrically defined construct, such as a
rectangle, line, polygon, or circle. Each of these objects has properties that
determine the dimensions (e.g. width, height), appearance (e.g. colour, fill, stroke
thickness), and position (e.g. x, y coordinates) of every object in the image. These
properties are stored as a list, often called the drawing list.

A common file format for vector graphics is SVG (Scalable Vector Graphics), which
is used to define vector graphics for the web. All popular web browsers support the
rendering of SVG images.

• Vector graphics are stored as a list of attributes


• Vector graphics are resolution independent, meaning scaling is possible
without loss in quality
• Resolution independence can make best use of high-resolution output
devices
• Layering is possible when using vector graphics
• Each object and its attributes can be edited independently of the others
• Generally file size is smaller than that of bit-mapped images unless the
graphic contains lots of layers or many complex objects
Sound
Sampling

Sampling is a method of converting an analogue audio signal into a digital signal. While
sampling a sound wave, the computer takes measurements of this sound wave at a regular
interval called sampling interval. Each measurement is then saved as a number in binary
format.

Sample rate

The sample rate (in Hz) is the number of samples in one second

Sample Resolution

The number of bits available for each sample. The higher the sample resolution, the
higher the quality of the audio. Bit depth is usually 16 bits on a CD and 24 bits on a DVD.

Sound File Size

File size = sampling rate x sample resolution x time (sec)

You might also like