Image file formats

bobwatson 32,724 views 22 slides Mar 03, 2011
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

A talk for the Harrow Computer Club on the characteristics of different image file types


Slide Content

Image File Formats
Harrow Computer Club – Wed, 1 Dec 2010
Bob Watson MA CMath MIMA MBCS

Start at the End
Extension Colour Compression Common Uses
JPG, JPEG 24-bit Lossy Photos, web pics
GIF 8-bit Lossless Web graphics – buttons,
icons, etc
PNG up to 24-bit Lossless Web – replacement for
GIF
TIF, TIFF 24-bit Lossless Professional
Photos etc

Types of Image Files
•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 5
x 20

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)
Picture SizeResolution
(dpi)
Pixel Size Pixels File Size
6" x 4" (postcard)300 1800 x 1200 2M 6 MB
6" x 4" (postcard)600 3600 x 2400 8M 24 MB
10" x 8" 300 3000 x 2400 7M 21 MB
10" x 8" 600 6000 x 4800 28M 84 MB

Compression
•Lossless
Reduce file size without losing image quality
Not as effective as lossy compression
Prioritise image quality over small file size
•Lossy
Take advantage of limitations of human vision
Discard “invisible” information
Allow variable quality levels (compression)
Lowest Compression Highest Compression
Larger file size Smallest file size
Best image quality Worst image quality

Original
1.5 MB
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
•Can reduce file size if image does not need
so many distinct colours
•Use fewer bits per pixel – eg 8-bits (1 byte)

GIF Files
•Pictures can contain at most 256 different colours
•File format defines a “palette” of 24-bit colours
•Each pixel stored as an 8-bit index into this palette
•Use 8-bits (1 byte) per pixel
•LZW Compression – lossless
•Good for images with limited set of
colours such as logos, web buttons etc
•Also support animation
•Supported by all web browsers
•Possible copyright problems

Animated GIF

Animated GIF

JPEG Files
•Full 24-bit colour – 16 million colours
•Compressed with JPEG algorithm
•Good for pictures with subtle colour variations
eg: photographs
•Typically produced by digital cameras
•Supported by all web browsers

TIFF Files
•Tagged Image File Format
•Owned by Apple but a published spec
•Originally designed as a common format for scanners but now
a popular professional format for colour images, photos, etc
•Can hold various “tags” as well associated with the image
eg: photographer, copyright, subject details, ...
•Supports several compression formats – mostly lossless
•Commonest is LZW, others include ZIP and JPEG and NONE!!
•Many possible variations
“Thousands of Incompatible File Formats”

PNG Files
•Portable Network Graphics
•Designed to replace GIF files as there was a patent issue with
LZW compression
•Also eliminates the restriction on number of colours
•Does not support animation
•Lossless compression (DEFLATE related to ZIP)
•Supported by most modern web browsers

The End
Extension Colour Compression Common Uses
JPG, JPEG 24-bit Lossy Photos, web pics
GIF 8-bit Lossless Web graphics – buttons,
icons, etc
PNG up to 24-bit Lossless Web – replacement for
GIF
TIF, TIFF 24-bit Lossless Professional
Photos etc
Tags