0% found this document useful (0 votes)
29 views

Image File Formats

This document discusses different image file formats. It describes JPG, GIF, and PNG formats which are commonly used on the web. JPG uses lossy compression and supports 24-bit color, making it suitable for photos. GIF is limited to 8-bit color but uses lossless compression, so it is often used for simple web graphics. PNG supports more colors than GIF and uses lossless compression, intended as a replacement for GIF. TIFF is described as a format for professional photos that supports 24-bit color and lossless compression.

Uploaded by

Ayano Miyuzaki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Image File Formats

This document discusses different image file formats. It describes JPG, GIF, and PNG formats which are commonly used on the web. JPG uses lossy compression and supports 24-bit color, making it suitable for photos. GIF is limited to 8-bit color but uses lossless compression, so it is often used for simple web graphics. PNG supports more colors than GIF and uses lossless compression, intended as a replacement for GIF. TIFF is described as a format for professional photos that supports 24-bit color and lossless compression.

Uploaded by

Ayano Miyuzaki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

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 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)

Picture Size Resolution Pixel Size Pixels File Size


(dpi)
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

You might also like