Professional Documents
Culture Documents
Data Representation L4 Images
Data Representation L4 Images
Computer Science
Section 1
4
Objectives
• Understand how a bitmap graphic is made up of
individual pixels
• Explain how each pixel is represented in binary
• Understand that the number of bits per pixel determines
the number of available colours for an image
• Explain the need for image metadata
• Explain the relationship between file size and image
resolution
Images
Unit 1 Data representation
Image resolution
• Resolution is the number of pixels within a
specific area
• The area of an image is expressed as its width and
height in pixels e.g. 3264 x 2448
• Screen resolution is expressed as pixels per inch (PPI)
• Print resolution is expressed as dots per inch (DPI)
Creating an Image
• Each pixel is given a 0 0 0 0 1 0 0 0 0 0
binary value 0 0 0 1 1 0 0 0 0 0
0 0 1 1 1 0 1 0 0 0
• Each value represents 0 1 1 1 1 0 1 1 0 0
a different colour 1 1 1 1 1 0 1 1 1 0
• 3 bits = 8 Colours 11 01 01 01 01 01
11 01 01 11
• 4 bits = 16 Colours
11 01 01 11 11
• How many bits per pixel 11 01 01 01 01 01 01
20 pixels
• How does the size of
the image affect file
size?
8 colours
Images
Unit 1 Data representation
Worksheet 4
• Now try the exercises in Tasks 1 and 2
Images
Unit 1 Data representation
Colour values
l
61 6 m
m 12
l
181ml
Images
Unit 1 Data representation
Image metadata
• Metadata is data about data
• It is information other than image data that is stored
with a file
• This will include:
• Colour depth in bits per pixel
• Resolution (Height and width in pixels)
• Date created
• Author
Image compression
• Reduces file size
• Two types:
• Lossy Compression (JPG)
• Lossless Compression (PNG)
Images
Unit 1 Data representation
Lossy compression
• Removes data permanently
• Tries to reconstruct an image without the missing data
• Much smaller file sizes but some loss of quality
380 KB 21 KB
Images
Unit 1 Data representation
Lossless compression
• Finds areas of the same colour and records them as
15 blue pixels rather than blue pixel, blue pixel, blue
pixel etc.
• 11011010,11011010,11011010,11011010 becomes
00000100-11011010
Images
Unit 1 Data representation
Worksheet 4
• Now try Task 3
Images
Unit 1 Data representation
Plenary
• A bitmap graphic is made up of individual
pixels
• Each pixel is represented in binary
• The number of bits per pixel determines the
number of available colours for an image
• The greater the image resolution, the larger
the file size