What is PNG?

According to Abbreviationfinder, PNG images use the .png extension and have obtained a MIME type (image / png) approved on October 14, 1996.

Animation

APNG is a PNG-based format that supports animation. APNG supports the viewing of a single image in case the decoder does not understand this format. It is accepted by Firefox and has a .png extension . MNG is an image format that supports animation and is based on the ideas and some sections of PNG, but it is a complex system and does not allow the viewing of a single image, which is what GIF and APNG do.

Technical comparison with other formats

Comparison with GIF

  • In most cases, PNG compresses better than GIF, although some implementations (see Photoshop) make a poor selection of filtering methods and generate larger files.
  • PNG supports, like GIF, indexed images with 1-bit or “binary” transparency. This type of transparency does not require an additional channel and only allows one color in the palette to appear 100% transparent.
  • PNG supports formats with a color depth of millions of colors (true color) and alpha channel, which provides much richer and more accurate color ranges than GIF and has transparency values ​​in between. Unfortunately, this allows true color PNGs to be erroneously compared to an indexed color GIF (256 colors).
  • GIF supports animation and PNG does not. (see animation section, above).

Comparison with JPEG

PNG and JPEG are formats that are designed for different functions, so only a general comparison can be made:

  • JPEG has a huge compression ratio to the detriment of image quality, ideal for large images and photographs. It does not admit transparency.
  • PNG is a lossless format with excellent compression, ideal for images consisting of large areas of flat color or with few color variations. Supports alpha channel and some extra attributes like gamma correction.

PNG on the web

Although the technical and compression characteristics make PNG an ideal format to replace GIF, its adoption has been very slow due in part to erroneous comparisons and some technical disadvantages:

  • It is not supported by some very old browsers (however these browsers are very rare nowadays).
  • Color management was crashing in some browsers (currently not very important and can be avoided).

Advantages of the PNG graphic format

The LZW compression algorithm using the popular GIF graphic format is owned by the Unisys company. Although the GIF format is patented, this does not prevent it from being the most widely used graphic format on the Internet to illustrate web pages.

There is a controversy on the Internet because the Unisys company has expressed its intention to prosecute the use of GIF images created from programs that do not have a proper license for their creation. This license must have been previously purchased from Unisys by the developers of the application that creates or uses this type of graphic files.

It is highly unlikely that this situation will affect individual designers and even professionals and managers of corporate websites. However, this is one of the reasons to start using the new PNG format.

PNG vs. GIF

The specification of the PNG format was officially published in October of 1996 by the World Wide Web Consortium (Web site). Like the rest of the products of this international consortium, PNG is a free-to-use specification that does not require a license of any kind for applications that use, create or edit this type of image.

The PNG format allows you to generate bitmap images with a high size compression ratio. It is a compression without loss of quality, like the GIFformat, but with a higher percentage of average compression.

Similar to GIF, PNG supports transparent backgrounds that allow a good integration of the image with the current background of the web page. PNG is superior to GIF in that it supports a color depth of up to 16.7 million colors. GIF supports only a maximum of 256 different colors in the same image.

More advantages of PNG.

PNG has two compression modes: standard and progressive. The latter facilitates the recognition of the image in the first moments of the download from the Internet, as it shows lines of the same distributed throughout the available surface. This is an interesting option when they are very large images or slow connections are used.

Including ‘metadata’ in the PNG file theoretically allows search engines to index these graphic files based on the included description, rather than just by name.

Browsers and graphic editors.

The PNG format is recognized and displayed correctly in most current browsers.

You can check if the browser used correctly supports PNG by visiting this URL, where there are two examples of images in this format: [www.conganat.org/iicongreso/comunic/008/png.htm] Regarding the creation and edition of PNG images, the main existing image editors such as Adobe Photoshop, Corel Photopaint or Paint Shop Pro can be used without problems.

Disadvantages of PNG.

The main disadvantage is that PNG does not allow you to create small animations like the GIF format. There is a complementary W3C format called MNG that does support animation but there is still no official standard for it.

Like GIF, as PNG is a format without loss of quality, it produces files that are excessively large for the reproduction of photographs or pictures compared to the equivalent JPG files. The latter can considerably reduce the size of this type of images with an almost negligible decrease in quality.

False beliefs

  • Internet Explorer 6 does not support transparent PNGs. One point should be qualified. Internet Explorer 6 and lower support binary transparency like GIF, but fail to display images with alpha channel. This is because the package that specifies the alpha channel is optional (tRNS) according to the PNG specification, however Internet Explorer 7 does support them.
  • PNG images are heavier than GIFs. Again, it is not true. This false belief is due to comparing poorly encoded or 32-bit PNGs with 256-color GIFs.

Color problems

Some versions of some browsers display the gamma correction values ​​even when they are not specified in the PNG. Known browsers with PNG display issues:

  • Internet Explorer 5.5 and 6.
  • Netscape 7.0 to 7.2.
  • Opera (versions prior to 7.50).

The end effect is that the color displayed in the PNG does not match the color scheme of the rest of the web page. An easy way to avoid this is to re-encode the PNG by truncating certain attributes. Some utilities for this purpose:

  • PNGOUT is a free DOS utility that uses a unique algorithm to recompress a PNG and reduce the file size to a minimum, without loss.
  • Superpng, is a free plugin for Photoshop that allows the optimization of PNG files.

PNG