PNG - Wikipedia, the Free Encyclopedia Page 1 of 8 PNG

PNG - Wikipedia, the Free Encyclopedia Page 1 of 8 PNG

PNG - Wikipedia, the free encyclopedia Page 1 of 8 PNG From Wikipedia, the free encyclopedia PNG (Portable Network Graphics) Portable Network Graphics is a bitmap image format that File extension: .png employs lossless data compression. MIME type: image/png PNG was created to both improve Developed by: W3C upon and replace the GIF format with Type of format: Image file formats an image file format that does not require a patent license to use. PNG is officially pronounced as "ping" (/pɪŋ/ in IPA), but it is often just spelled out — possibly to avoid confusion with the network tool ping. PNG is supported by the libpng reference library, a platform- independent library that contains C functions for handling PNG images. PNG files nearly always use the file extension PNG or png and are assigned the MIME media type A PNG image with an 8-bit image/png (approved on October transparency channel (top). The same 14, 1996). image is overlaid onto a checkered background (bottom). Contents 1 History and development 2 Technical details 2.1 File header 2.2 "Chunks" within the file 2.2.1 Essential chunks 2.2.2 Metadata chunks 2.3 Color depth 2.4 Transparency of image 2.5 Compression 2.6 Interlacing 2.7 Animation 3 Technical comparison with GIF 4 Bitmap graphics editor support for PNG 5 Web browser support for PNG 6 File size and optimization software 7 Comparison with JPEG 8 Comparison with TIFF 9 See also 10 External links 10.1 libpng.org 10.2 W3C 10.3 Others 10.4 Internet Explorer incompatibility http://en.wikipedia.org/wiki/PNG 30/07/2006 PNG - Wikipedia, the free encyclopedia Page 2 of 8 History and development The motivation for creating the PNG format came in early 1995, after Unisys announced that it would be enforcing software patents on the LZW data compression algorithm used in the GIF format (the acronym PNG was originally recursive, standing for "PNG's Not GIF"). For more on this controversy see GIF (Unisys and LZW patent enforcement). There were also other problems with the GIF format which made a replacement desirable, notably its limitation to 256 colors at a time when computers capable of displaying far more than 256 colors were becoming common. Although GIF allows for animation, it was decided that PNG should be a single-image format. A companion format called MNG has been defined for animation. PNG gained some additional popularity in August 1999, after Unisys terminated its royalty-free patent licenses to developers of free software and non-commercial software. Version 1.0 of the PNG specification was released on July 1, 1996, and later appeared as RFC 2083 (http://tools.ietf.org/html/2083). It became a W3C Recommendation on October 1, 1996. Version 1.1, with some small changes and the addition of three new chunks, was released on December 31, 1998. Version 1.2, adding one extra chunk, was released on August 11, 1999. PNG is now an International Standard (ISO/IEC 15948:2003), also released as a W3C Recommendation on November 10, 2003. This version of PNG differs only slightly from version 1.2 and adds no new chunks. Technical details File header A PNG file starts with an 8-byte signature. The hexadecimal byte values are 89 50 4E 47 0D 0A 1A 0A. Each of the header bytes is there for a specific reason [1] (http://www.libpng.org/pub/png/spec/1.1/PNG-Rationale.html#R.PNG-file-signature): Byte(s) Purpose Has the high bit set to detect transmission systems that do not support 8 bit data and to reduce the chance that a 89 text file is mistakenly interpreted as a PNG. 50 4E 47 In ASCII, the letters "PNG", allowing a human to identify the format easily if it is viewed in a text editor. 0D 0A A DOS style line ending (CRLF) to detect DOS-UNIX line ending conversion of the data. 1A A byte that stops display of the file under DOS 0A A unix line ending (LF) to detect UNIX-DOS line ending conversion. "Chunks" within the file After the header come a series of chunks each of which conveys certain information about the image. Chunks declare themselves as critical or ancillary, and a program encountering an ancillary chunk that it does not understand can safely ignore it. This chunk-based structure is designed to allow the PNG format to be extended while maintaining compatibility with older versions. The chunks each have a header specifying their size and type. This is immediately followed by the actual data, and then the checksum of the data. Chunks are given a 4 letter case sensitive name. The case of the different letters in the name provides the decoder with some information on the nature of chunks it does not recognise. The case of the first letter indicates if the Chunk is essential or not. If the first letter is uppercase, the chunk is essential. If not, the chunk is ancillary. Essential chunks contain information that is necessary to read the file. If a decoder encounters an essential chunk it does not recognise, it must abort reading the file. The case of the second letter indicates if the chunk is "public" (either in the specification or the registry of special purpose public chunks) or "private" (not standardised). Uppercase is public and lowercase is private. This ensures that public and private chunk names can never conflict with each other. The third letter must be uppercase to conform to the PNG specification. It is reserved for future expansion. The case of the fourth letter indicates if a chunk is safe to copy by editors that do not recognise it. If lowercase the chunk may be safely copied regardless of the extent of modifications to the file. If uppercase it may only be copied if the http://en.wikipedia.org/wiki/PNG 30/07/2006 PNG - Wikipedia, the free encyclopedia Page 3 of 8 modifications have not touched any critical chunks. Essential chunks A decoder must be able to interpret these to read and render a PNG file. IHDR must be the first chunk, it contains the header. PLTE contains the palette; list of colors. IDAT contains the image, which may be split among multiple IDAT chunks. Doing so increases filesize slightly, but makes it possible to generate a PNG in a streaming manner. IEND marks the image end. Metadata chunks Other image attributes that can be stored in PNG files include gamma values, background color, and textual metadata information. PNG also supports color correction with the use of color management systems like sRGB. bKGD gives the default background color. cHRM gives the white balance. gAMA specifies gamma. hIST can store the histogram, or total amount of each color in the image. iCCP is an ICC color profile. iTXt contains international (UTF-8) text, compressed or not. pHYs is the physical size of the image. sBIT (significant bits) indicates the color-accuracy of the source data. sPLT suggests a palette to use if the full range of colors is unavailable. sRGB indicates that standard RGB colors are used. tEXt can store text that can be represented in ISO 8859-1, with one name=value pair for each chunk. tIME stores the time that the image was last changed. tRNS contains transparency information. For indexed images, it stores an alpha channel value for each palette entry. For truecolor and greyscale images, it stores a single pixel value that is to be regarded as transparent. zTXt contains compressed text with the same limits as tEXt. The lowercase first letter in these chunks indicates that they are not needed for the PNG specification. The lowercase last letter in some chunks indicates that they are safe to copy, even if the application concerned does not understand them. Color depth PNG images can either use palette-indexed color or be made up of one or more channels (numerical values directly representing quantities about the pixels). When there is more than one channel in an image all channels have the same number of bits allocated per pixel (known as the bitdepth of the channel). Although the PNG specification always talks about the bitdepth of channels, most software and users generally talk about the total number of bits per pixel (sometimes also referred to as bitdepth or color depth). The number of channels will depend on whether the image is greyscale or color and whether it has an alpha channel. PNG allows the following combinations of channels: greyscale greyscale and alpha (level of transparency for each pixel) red, green and blue (rgb/truecolor) red, green, blue and alpha PNG color options Bit depth per channel Type 124816 indexed (color type 3) Yes Yes Yes Yes No greyscale (color type 0) Yes Yes Yes Yes Yes greyscale & alpha No No No Yes Yes (color type 4) http://en.wikipedia.org/wiki/PNG 30/07/2006 PNG - Wikipedia, the free encyclopedia Page 4 of 8 truecolor No No No Yes Yes (RGB - color type 2) truecolor & alpha No No No Yes Yes (RGBA - color type 6) With indexed color images, the palette is always stored at a depth of 8 bits per channel. The palette must not have more entries than the image bitdepth allows for but it may have fewer (so if an image for example only uses 90 colors there is no need to have palette entries for all 256). Indexed color PNGs are allowed to have 1, 2, 4 or 8 bits per pixel by the standard; greyscale images with no alpha channel allow for 1, 2, 4, 8 or 16 bits per pixel.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us