Confused by Graphics File Formats?

Confused by a profusion of graphics file types? Want to know the differences between jpg, gif, png and tif and when to use each format? This article will answer your questions and explain why these different formats exist. Originally published on Associated Content

If you work with computers you have no doubt come across the fact that there are different file formats for different types of document. Each application, be it word processor, spreadsheet, or email client has files which it can open and save on your hard disk drive. These files are closely associated with their application so, for example, you cannot open your spreadsheets with your word processor.

There are also files which are used for simple information exchange. An example of these types of files is provided by the different file types used to save pictures and images. There are a number of these file types, which we generally recognize by their extensions, JPG, BMP, and so on. Each type has special strengths and weaknesses. Here is a guide to the graphics file formats that you typically encounter that will enable you to pick out the correct type to use when you next need to share graphical information.

JPEG or JPG. Jpeg files are designed to efficiently contain photographic information. Consequently, you will probably find that your camera, web-cam, or your telephone (if it has a camera) will save photograph files in jpeg format. This format has been carefully designed to work with the structure of photographs of the real world. The jpeg file format uses a special Fourier transform algorithm to compress the image significantly. This compression makes intelligent guesses on the color stored in a given pixel based on its proximity to other pixels and this leads to very high degrees of compression. However, the compression is not perfect. So if you save an image in jpeg format and then reopen that image and view it in detail you may notice some minor changes to the intensity and color for some of the pixels. Generally this is not important for saving photographic images, because the jpeg algorithm is tuned to deal with images of the real world. However, if you use jpeg for an image with straight lines or large sections of black and white, you will see slight artifacts in the jpeg image. These are caused by the inexactness of the jpeg compression scheme.

Some programs which are designed to work with jpeg will allow you to supply a compression factor, these let the program know how aggressive to be with its compression algorithm. Generally speaking the default value will work fine, but if you know that your image is very high contrast, you may want to reduce the compression factor, and you will reduce the compression errors that occur, at the expense of having a larger resulting file.

Use jpeg for photographs that you want to store or share with friends. It is a very efficient file format, the compression scheme will save you disk space, and the quality will be excellent

GIF. Gif is now quite an old file format and it is used less and less in new programs. However, it has been widely used in the past and so you will still encounter the format. Gif files are quite well compressed, and unlike jpeg, the compression scheme is loss less. However, gif uses a limited number of color levels. Because of the limited number of colors per pixel you may see changes in the colors of images saved in gif files, particularly if the original image was richly colored. Gif is also capable of storing simple animations, which are used to provide animated pictures on some web sites.

Although gif reduces the number of colors which are stored in an image it does not compress the basic layout of the pixels in any way. Hence gif can be a good choice if you want to save sharp lines which are not stored well with the jpeg format, but do not have a large number of colors.

BMP. This is the native file format used for images by many Windows applications. The files are generally very large and the images can store large numbers of colors. Most often you will not see any color loss with bmp files. Generally, for sharing images in email or importing images into other applications you would not use BMP files because of the large file size. However, on Windows it is a viable choice of file format for graphical files and because it is the default format on Windows it can work well when you need to share information between Windows programs.

PNG. Png, or portable network graphics, format was designed to be the successor to gif format. It uses a different compression algorithm to that used in the gif format (originally the gif format compression algorithm was covered by a patent, which inhibited its use). However, like gif, the png compression algorithm does not lose information. Additionally, png does not reduce the number of colors when saving an image. Hence png is a good choice for graphical files which are not photograph-like.

TIFF. Tiff or tif files are often used by scanner and fax software and offer the creators of these programs a high degree of customizability for their specific applications. Hence, reading a tif file into the program which created that file will generally result in different editing options than reading the same tif file into another program. For this reason tif is best used within the confines of a specific program and not for information exchange.

Jpeg, gif, bmp, png and tiff cover the majority of the graphic image file formats that you will encounter. This short guide gives you the necessary information to know what to expect from these file types, which type to use, and when to use each format in the future.

Comments are closed

If you would like to get in touch with me, please mail zfs at themolecularuniverse.com

recent comments

Posted by ZFS | Permanent link
[StumbleUpon] [Digg] [Reddit] [Facebook] [Google]