PNG format of the past life

PNG is a lossless compressed bit-image format designed to replace the GIF and TIFF file formats while adding features that the GIF file format does not have. PNG uses lossless data compression algorithm derived from LZ77 — LZW patent (Lempel-Zev-Welch) The compression algorithm patent is held by Unisys, which limits the use of GIF in free software and hence the PNG format.

Unisys, the owner of the GIF patent, announced the imposition of the GIF patent in December 1994. Prior to the announcement in 1994, the patent had not been enforced since 1985. Paying royalties to use GIF patents is fine for big software companies like Adobe, but it limits developers who offer free software.

The original motivation for the PNG format was the urgency of the market, says Liley of the W3C. Everyone used to use GIFs, but all of a sudden we couldn’t use them anymore, and the market wanted alternatives.

PNG formats are available in 8-bit, 24-bit, and 32-bit formats. 8-bit PNG supports two different transparency formats (index transparency and Alpha transparency), while 24-bit PNG does not support transparency. 32-bit PNG has an 8-bit transparency channel on the basis of 24-bit, so it can display 256 levels of transparency.

The numbers after PNG8 and PNG24 represent the maximum number of color values that can be indexed and stored in this PNG format. Eight is two to the eighth which is 256 colors, and 24 is two to the 24th which is about 16 million colors. PNG 32 adds an 8-bit transparency channel in addition to the 24-bit channel, thus showing 256 levels of transparency

The advantage of PNG

PNG has two features for image storage: lossless compression and support for transparency.

  • Since PNG files are compressed using an algorithm derived from the LZ77 algorithm, the result is a high compression ratio with no data loss. It uses special coding method to mark the repeated data, so it has no effect on the color of the image, and it is impossible to produce the loss of color, so that it can be repeatedly saved without degrading the quality of the image.

  • PNG can define 256 layers of transparency for the original image, so that the edges of the color image can blend smoothly with any background, thus completely eliminating serrated edges. This is something GIF and JPEG don’t have.

PNG Development History

In early 1995, Unisys began charging commercially for software patents on its LZW data compression algorithm used in the GIF format. To avoid patent implications, PNG Graphics for individual images and MNG(multiple-image Network Graphics) formats for animations are created simultaneously.

In June 1996, the draft of PNF (Portable Network Frame) was proposed, and it was renamed to MNG (Multiple-Image Network Graphics) in August of that year.

On 1 July 1996, version 1.0 of the SPECIFICATION for PNG was released, which became known as the RFC 2083 Standard and became a W3C recommendation on 1 October 1996.

In August 1999, Unisys went a step further by discontinuing the free GIF patent license for both free and non-commercial software developers, thus bringing more attention to the PNG format – and each of them, like MP3 and OGG, is not paying the same royalty

Version 1.1 of PNG was released on 31 December 1998, with minor modifications and three new data block definitions added

Version 1.2 of PNG was released on 11 August 1999, adding another data block

Version 1.0 of the MNG specification was released on January 31, 2001. MNG was developed by the PNG development team. However, due to the complex structure of the MNG library, the process of using MNG was very resource-intensive. Chrome, Internet Explorer, Opera, and Safari have never been supported. Both Chrome and Opera are promoting WebP

On 10 November 2003, the current version of the international standard for PNG (ISO/IEC 15944:2003) was released as a W3C recommendation, with only minor differences from PNG1.2.

In late 2004, an animation extension to PNG, APNG, was proposed by Two Mozilla programmers at Mozilla, Stuart Parmenter and Vladimir Vukićević. This is a simpler animation implementation than MNG. PNG decoders that do not recognize the APNG format can at least play back the first normal PNG picture. But APNG has always been a tragedy, and even the Mozilla community rejected it until 2007.

On March 23, 2007, Mozilla belatedly supported the APNG format for the first time in Mozilla Firefox 3.0.

On April 20, 2007, Mozilla wanted APNG to become an official standard, so the PNG group put up a vote, which ended in 8: 10 votes rejected APNG as an official standard because the PNG organization is determined to continue promoting MNG, but this does not affect Mozilla’s continued support for APNG.

PNG vsJPEG2000 vsGIF

In the early days of the Web, there were few image formats to choose from, and GIF was almost the only one (GIF-1987, JPEG-1992, PNG-1996, APNG-2004, WebP-2010).

PNG personally feel is the enhanced version of GIF free of royalty. On June 20, 2003, it was predicted that the patent on GIF, one of the most popular image formats on the Web, would expire, and PNG would die in its own right — thanks to the evil Internet Explorer’s half-hearted support for it. PNG is getting better and better after IE6 and IE7 died.

Wanted to use PNG’s translucent feature, but Internet Explorer had 90% of the market in 2003, and the results most people saw from Internet Explorer were pretty ugly.

JPEG2002, as an upgrade to JPEG, supports both lossy and lossless compression. But PNG is the dominant transparent format.

Early browsers didn’t support PNG images; JPEG and GIF are the dominant image formats. Due to the color depth limitations of GIF, images with color transitions on web pages are used in JPEG. Either way, JPEG compression results in a slightly blurry image. PNG can be as accurate as possible at the corresponding color depth, while keeping the image file small. PNG has become a better choice for small gradient images, and many browsers already support it well

The PNG specification does not include a standard for embedded EXIF (Exchangeable Image File Format) image data, such as images taken by digital cameras. TIFF, JPEG 2000 and DNG all support EXIF.

Previously wrote “JPEG/Exif/TIFF format interpretation (1):JEPG image compression and storage principle analysis”, interested can point.

Reference article:

When the GIF patent expires, when the PNG format is dead? www.blueidea.com/news/other/…

Aotu. IO/Notes /2016/…

Reprint the home station article the PNG file read (1) : PNG/incarnations of APNG format, please indicate the source: www.zhoulujun.cn/html/theory…