Skip to content

The Benefits of PNG

Share this Post:

Media servers typically support many types of still image formats. What are the benefits of using one format over another? Recently, while I was using an Apple Mac-based media server on a show, I asked myself this very question when I ran up against an issue involving the use of the Alpha channel. Here are a few reasons why I'm now a big fan of PNG. The PNG Format

 

PNG stands for Portable Network Graphics and it is described as a single image format with lossless compression. It was originally developed as an alternate format to the GIF for a variety of reasons having to do with alpha channel, gamma correction, improved interlacing and better compression ratios. But it has many advantages that go beyond just being a replacement for GIF files.

 

Lossless Compression

 

For image editing, PNG offers fully lossless compression, so saving and re-saving file does not degrade the quality of the image. Even using its highest-quality settings, JPG is not capable of this; editing an existing JPG results in image degradation from the get-go. Also, saving an image in PNG will not introduce visible artifacts that aren't already in the image.

 

There are five primary image types in PNG, including grayscale (up to 16-bits), Truecolor (up to 48-bits), indexed-color (palette-based, 8-bit, 256 colors), grayscale with alpha and Truecolor with alpha.

 

In addition to providing the flexibility of multiple image types, PNGs allow for anti-aliasing, providing for smoother blending within the image and its surroundings. This allows the PNG to create the illusion of smooth curves, as opposed to the visible jagged corners and background artifacts found in a GIF file.

 

PNGs store gamma correction information as well, resulting in images that are optimized approximately for the display device regardless of the computer platform chosen. This is only an estimation; however, it does a decent job in most applications.

 

Alpha Channels

 

Alpha channels, or as they are sometimes referred to, mask channels, are used to apply variable transparency to an area within an image. It works like this: When the image is stored, every pixel is stored with four bytes of information (red, green, blue and alpha) as opposed to three (red, green, and blue). The result is that the image can be overlaid on any background with the transparent areas allowing the background image to be visible.

 

Alpha channels can be more useful than using the mask channel or an alpha visual effect in a media server, because in the PNG, the image retains the color information in the areas which are not designated to be transparent. When you are playing a non-transparent image in a media server and then applying an alpha color masking effect, by contrast, all of the information for a specific color is removed from the image. That results in undesirable transparent areas within the image.

 

File Size

 

Because of the unique compression algorithm used in a PNG, the file sizes are much lower than you might expect. In fact, when they are properly optimized, in many cases a PNG image is even smaller than its GIF and JPG counterparts. It's important to remember, though, that when you're working with PNGs, for every pixel there are four bytes of stored data, so when you assign an area of transparency in an image, unless that image data is completely removed from the image (cut or cropped), then in reality the entire image is being stored just with an alpha channel value that makes the pixels transparent. This is a useful tip when you are creating custom content for use with media servers because the image size will be considerably reduced, which may help with playback.

 

Disadvantages

 

The only real disadvantage worth noting about using PNG files is that it is a raster format, not a vector format, so it doesn't scale up to a bigger size as well. An image that contains shapes or text must be created in a different format in order to retain the vector information so it can be resized without becoming too pixelated. However, JPG and GIF images are not vector graphics formats either, so in terms of using them with a media server, there is no notable disadvantage to using a PNG.

 

Color depth in a PNG is superior to a GIF image, but not necessarily so with a JPG image. However, because JPG is a lossy compression, if the image ever needs to be re-edited and re-saved, doing so means that image quality will be lost each time it is resaved. For that reason, it might be advisable to stick with PNG if your images require resizing and editing onsite, at least until the final edit has been made. But then, are we ever sure of when the last edit has ever been made?

 

Flexibility

 

Most current media servers do support PNG file format, including Catalyst, MBox, Maxedia, Hippotizer and Arkaos MediaMaster. Most all of these same media servers support JPG, GIF, TIFF and BMP formats as well, so it is important to know which format to use and why you are using it in order to insure the best quality image playback from your media server.