portable network graphics (png)

16
Presented by SARMAD MAKHDOOM

Upload: sarmad-makhdoom

Post on 13-Jan-2015

537 views

Category:

Education


5 download

DESCRIPTION

A basic introductory slides about Portable Network Graphics (PNG), how this is helping in web and what are the mechanism behind its storing technique.

TRANSCRIPT

Page 1: Portable Network Graphics (PNG)

Presented bySARMAD MAKHDOOM

Page 2: Portable Network Graphics (PNG)

Introduction– GIF features retained in PNG include

• Indexed-color images of up to 256 colors.• Progressive display• Transparency• Complete hardware and platform independence• Ancillary information

– Important new features of PNG, not available in GIF• Truecolor images• Full alpha channel• Image gamma information• Faster initial presentation

– PNG is designed to be• Simple and portable• Well compressed

Page 3: Portable Network Graphics (PNG)

Color values Image layout Alpha channel Filtering Interlaced data order Text strings

Page 4: Portable Network Graphics (PNG)

PNG file signature Header (137 80 78 71 13 10 26

10) Chunk layout– Length– Chunk Type– Chunk Data– CRC (Cyclic Redundancy Check)

Chunk naming conventions

Page 5: Portable Network Graphics (PNG)
Page 6: Portable Network Graphics (PNG)

Chunk Specifications IHDR Image header

Width: 4 bytesHeight: 4 bytesBit depth: 1 byteColor type: 1 byteCompression method: 1 byteFilter method: 1 byteInterlace method: 1 byte

Page 7: Portable Network Graphics (PNG)

PLTE Palette IDAT Image data IEND Image trailer

Page 8: Portable Network Graphics (PNG)

bKGD Background color tRNS Transparency gAMA Image gamma tIME Image last-modification time iCCP Embedded ICC (nIternational Color

Consortium)

tEXt Textual data sRGB Standard RGB color space

Page 9: Portable Network Graphics (PNG)

pre-compression: filtering (prediction)

compression: DEFLATE

TYPE NAME

0 None

1 Sub

2 Up

3 Average

4 Paeth

Page 10: Portable Network Graphics (PNG)

The Adam7 algorithm.

Page 11: Portable Network Graphics (PNG)

Comparison with Graphics Interchange Format (GIF)

On most images, PNG can achieve greater compression than GIF (see the section on filesize, below). – PNG gives a much wider range of transparency options

than GIF, including alpha channel transparency. – Whereas GIF is limited to 8-bit indexed color, PNG gives

a much wider range of color depths, including 24-bit (8 bits per channel) and 48-bit (16 bits per channel) truecolor, allowing for greater color precision, smoother fades, etc. When an alpha channel is added, up to 64 bits per pixel (before compression) are possible.

– GIF intrinsically supports animated images. PNG supports animation only via unofficial extensions (see the section on animation, above).

– PNG images are widely supported (for instance, with modern web browsers and office software), but not as widely supported as GIF images.

Page 12: Portable Network Graphics (PNG)

Comparison with JPEG– JPEG (Joint Photography Experts Group) can

produce a smaller file than PNG for photographic (and photo-like) images, since JPEG uses a lossy encoding method specifically designed for photographic image data. Using PNG instead of a high-quality JPEG for such images would result in a large increase in filesize (often 5–10 times) with negligible gain in quality

Page 13: Portable Network Graphics (PNG)

PNG compatible browsers include: Apple Safari, Google Chrome, Mozilla Firefox, Opera, Camino, Internet Explorer 7 – 4.0 crashes on large PNG chunks.– 4.0 does not include the functionality to view .png files, but there is a

registry fix.– 5.0 and 5.01 have broken OBJECT support.– 5.01 prints palette images with black (or dark gray) backgrounds under

Windows 98, sometimes with radically altered colors.– 6.0 fails to display PNG images of 4097 or 4098 bytes in size.– 6.0 cannot open a PNG file that contains one or more zero-length

IDAT chunks.– 6.0 sometimes completely loses ability to display PNGs, but there are

various fixes.– 6.0 and below has broken alpha-channel transparency support (will

display the default background color instead). However there are various fixes:

Page 14: Portable Network Graphics (PNG)
Page 15: Portable Network Graphics (PNG)
Page 16: Portable Network Graphics (PNG)