36
1 Image Formats

Image Formats

  • Upload
    lottie

  • View
    68

  • Download
    3

Embed Size (px)

DESCRIPTION

Image Formats. Image Formats. To be able save image data for future manipulation and display we need to be able to store it in a consistent manner Formats enable standardisation and the use of graphical data by more than one application. Standards. - PowerPoint PPT Presentation

Citation preview

Page 1: Image Formats

1

Image FormatsImage Formats

Page 2: Image Formats

2

Image FormatsImage Formats

To be able save image data for future manipulation and display we need to be able to store it in a consistent manner

Formats enable standardisation and the use of graphical data by more than one application

Page 3: Image Formats

3

StandardsStandards

Unfortunately, when the first graphics applications appeared there were no set graphics formats

Different applications stored graphical data in the most suitable way for that application e.g.Targa (.TGA from Truevision)Scitex (.SCT)

Page 4: Image Formats

4

Graphical InformationGraphical Information

There are two principle methods of representing graphical dataVectors

Bitmaps (raster or pixel maps)

Page 5: Image Formats

5

Vector GraphicsVector Graphics

Vector images are made up of many individual, scalable objects

These objects are defined by mathematical equations rather than pixels

Objects may consist of lines, curves, and shapes with editable attributes such as colour

Page 6: Image Formats

6

Vector GraphicsVector Graphics

Unsuitable for producing photo-realistic imagery

(1,1)

(4,2)

(2,3) Radius 1

Page 7: Image Formats

7

BitmapsBitmaps

Bitmap images - also known as raster images - are made up of pixels in a grid

Page 8: Image Formats

8

BitmapsBitmaps

Bitmaps work well with the type of sampled images that are produced by real-world applications

They are good at representing complex variations in colours, shades and shapes

Page 9: Image Formats

9

GIFGIF

CompuServe developed the Graphics Interchange Format to enable graphical data to be transferred via their network

One of the most widely used image file formats

Two main versions of the format:the original definition, published in 1987

(GIF87A) enhanced version was released in 1989

(GIF89A)

Page 10: Image Formats

10

GIFGIF

It is an efficient format, but is limited to a palette of only 256 colours

Page 11: Image Formats

11

GIFGIF

One of the two main formats supported by Internet browsers

Best format for line-art images, such as icons, graphs and line-art logos

Uses LZW lossless compressionSupports the sequencing or overlay of

multiple images – Animated GIFsSupports transparent backgrounds

Page 12: Image Formats

12

GIF FormatGIF Format

GIF Signature

Screen Descriptor

Image Descriptor

Global Colour Map

Local Colour Map

Image Data

GIF Terminator

Repeated 1 to n times

Identifies GIF and format

GIF87A or GIF89A

Page 13: Image Formats

13

GIF Screen DescriptorGIF Screen Descriptor

Describes the overall parameters for all GIF images in the file

Screen Width

Screen Height

Background

Aspect ratio

M CR S Size

12

34

5

6

7

M = 1, Global colour map follows Descriptor

CR = bits per pixel in image

S = whether the Global Colour Table is sortedSize = Size of Global Colour Table

Background = Index in the global colour table for the background colour

Aspect ratio of pixels

Bytes

Page 14: Image Formats

14

GIF Global Colour MapGIF Global Colour Map

This block contains a colour table, which is a sequence of bytes representing red, green, blue colour triplets

Used by images without a Local Colour Table

Page 15: Image Formats

15

GIF Image DescriptorGIF Image Descriptor

Defines the placement of the following image within the space defined in the Screen DescriptorAlso defined are flags to indicate the presence

of a local colour map and to define the pixel display sequence

Page 16: Image Formats

16

GIF Local Colour MapGIF Local Colour Map

This block contains a colour table, which is a sequence of bytes representing red, green, blue colour triplets

Used for the image data directly following it

Page 17: Image Formats

17

Image DataImage Data

Contains raster image index values for the image compressed using LZW lossless compression

Included in the image data is graphic control information for animated GIFs such as time between consecutive images

Page 18: Image Formats

18

Application ExtensionsApplication Extensions

Application Extensions allow for blocks of data to be inserted in the GIF for specific programs to act upon e.g.To loop the imagesTo set how many times an image

should loop

Page 19: Image Formats

19

Animated GIFsAnimated GIFs

Produced by defining several images within a GIF file and displaying them sequentiallyProvides simple low quality animationNot very good for large or long duration

animations

Page 20: Image Formats

20

Transparent GIFsTransparent GIFs

The GIF89a file format allows you to pick one colour from the colour map of the GIF to be transparent

Page 21: Image Formats

21

JPEGJPEG

Developed by the Joint Photographic Experts Group, a working group set up jointly by ISO and CCITT

The dominant format for high quality true colour images

JPEG images are full-colour images (24-bit, or true colour), unlike GIFs that are limited to a maximum of 256 colours in an image

Page 22: Image Formats

22

JPEGJPEG

Typically achieves compression ratios of 30:1 with true colour imagesbut both compression and unpacking are

relatively slow Most widely used of the sophisticated

image storage/compression formats such as wavelet and fractal

Can use many incompatible coding schemes, however baseline lossy method normally used

Page 23: Image Formats

23

A Word About CompressionA Word About Compression

There are two general types of compression that can be applied to digital media such as audio, video, text etc.Lossless compressionLossy compression

Page 24: Image Formats

24

Lossless CompressionLossless Compression

A very basic method of lossless compression is Run Length Encoding 11111111111111111100000111111111

• 4 Bytes long18,5,9

• 3 Bytes long

Compresses data by storing it in a more appropriate way

Rarely gives compression better than 2:1

Page 25: Image Formats

25

Lossy CompressionLossy Compression

Provides compression by removing parts of the data

Takes advantage of the properties of the human sensory system – vision and hearing

Tries to removes data without it being noticed e.g.The eye is relatively poor in distinguish

differences in chrominance (changes in colour)

Page 26: Image Formats

26

CompressionCompression

As lossless and lossy compression work in different ways they can both be applied to the same data

Compression is often most effective when both lossless and lossy compression methods are used together

Page 27: Image Formats

27

JPEG StagesJPEG Stages

Conversion from RGB to Luminance, Brightness and ChrominanceThe human eye is much less sensitive to

changes in colour (chrominance) than brightness

Colour information is subsampled (lossy)

Page 28: Image Formats

28

JPEG StagesJPEG Stages

Discrete cosine transform is then appliedIntensity data converted to frequency data

This frequency data is then quantized (lossy)

Quantized data is then Huffman compressed (lossless)

Page 29: Image Formats

29

JPEG CompressionJPEG Compression

JPEG compression efficiency as a function of approximate quality setting

Quality setting true colour image

95% 4.5 : 1

75% (default) 12 : 1

50% 19 : 1

20% 41 : 1

10% 59 : 1

5% 92 : 1

Page 30: Image Formats

30

JPEG CompressionJPEG Compression

Original image After 31:1 compression

Page 31: Image Formats

31

JPEG CompressionJPEG Compression

Magnified views of Red Sea / Gulf of Aden region

Page 32: Image Formats

32

PNGPNG

Portable Network Graphics is a new bit-mapped graphics format similar to GIFApproved as a standard by the World Wide

Web consortium to replace GIF because GIF uses a patented data compression algorithm called LZW

Uses lossless compressionHandles true colour images

Gives better quality reproduction than GIF, but no animation

Page 33: Image Formats

33

TIFFTIFF

Tag Image File Format - developed jointly by Microsoft and Aldus to exchange image data between desktop publishing and related packages

Versatile format that can handle almost any kind of image efficientlyA variety of alternative compression options

are supported. Unfortunately this makes it hard to implement decoding software

Page 34: Image Formats

34

Sun RasterfileSun Rasterfile

Developed by Sun Microsystems for storing images displayed on graphics workstations

The format is well supported by Sun, but rarely used on other systems

Easy to code and decode

Page 35: Image Formats

35

BMP DIBBMP DIB

The Microsoft Device Independent Bitmap format is the principal image format used by Microsoft Windows applications on IBM-compatible PCs

Like the Sun Rasterfile format it is easy to implement but rarely used on other systems

Page 36: Image Formats

36

FinFin

Fin