Image File Formats
Image File Formats
• Vector
Images created from geometrical primitives such as points, lines,
curves and other mathematically defined shapes
• Bitmap
Images recorded as an array of pixels – typically used for the
representation of photographic images
Vector Images
Not really relevant to this talk but we need to define them so
we know what we're not talking about
•Stored as instructions, not pixels
•eg: Draw Line from point A to point B
with thickness T and colour C
•or: Draw Circle with centre at X, radius R,
line thickness T, line color C, inside colour Z
•Essentially "drawings" or cartoons
•Created by specialist tools such as Adobe Illustrator
or Corel Draw
Vector Images
• Files are typically quite small as they contain just simple
instructions not information about every pixel
• Resolution Independent – nothing in the instructions need
specify absolute measurements – can all be relative to the
picture size
• Vector images can be resized (and enlarged in particular)
without any loss of quality
Bitmap Images
• Images stored as a rectangular matrix of pixels
• Pixel = picture element = a coloured dot
• Used for photographs, "paint" images, etc
• Can capture more subtlety than vector images
• The colour of every separate pixel is stored,
so typical file sizes much larger
• Pixel dimensions are fixed - cannot easily be enlarged
without loss of quality
x 20
x5
File Sizes
• Bitmap files typically larger than vector files
• For photos, need at least 8-bits for each of the three primary
colours (Red, Green, Blue)
• Inkjet printers typically print at 300 or 600 dots per inch (dpi)
High
Lossy
Compression
92 KB
Compression
• Lossless
RLE (Run Length Encoding) – Windows bitmap files (bmp, ico)
LZW (Lempel-Ziv-Welch) – GIF & TIFF files
ZIP – TIFF files
• Lossy
JPEG (Joint Photographic Experts Group)
Best suited to photos and paintings of realistic scenes with
smooth variations of tone and colour
Colour
• For photos, need 8-bits per primary colour
• 24-bits (3 bytes) per pixel
• 16M different colours