Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Portable Network Graphics (PNG)


Published on

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

  • Be the first to comment

Portable Network Graphics (PNG)

  1. 1. Presented by SARMAD MAKHDOOM
  2. 2.  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
  3. 3.  Color values  Image layout  Alpha channel  Filtering  Interlaced data order  Text strings
  4. 4.  PNG file signature  Header (137 80 78 71 13 10 26 10)  Chunk layout – Length – ChunkType – Chunk Data – CRC (Cyclic Redundancy Check)  Chunk naming conventions
  5. 5.  Chunk Specifications  IHDR Image header Width: 4 bytes Height: 4 bytes Bit depth: 1 byte Color type: 1 byte Compression method: 1 byte Filter method: 1 byte Interlace method: 1 byte
  6. 6.  PLTE Palette  IDAT Image data  IEND Image trailer
  7. 7.  bKGD Background color  tRNSTransparency  gAMA Image gamma  tIME Image last-modification time  iCCP Embedded ICC (nIternational Color Consortium)  tEXtTextual data  sRGB Standard RGB color space
  8. 8.  pre-compression: filtering (prediction)  compression: DEFLATE TYPE NAME 0 None 1 Sub 2 Up 3 Average 4 Paeth
  9. 9. The Adam7 algorithm.
  10. 10.  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.
  11. 11.  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
  12. 12.  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: