Understanding image file formats

Posted on

The following is a short take on various file formats for images.

Images come in a variety of file formats. Which one do you need for your project? Like many questions, the answer is … it depends. There are several factors in choosing a file format, but first let’s describe each.

Raw Format
The raw format is similar to a negative, albeit in digital terms. Raw captures all image data recorded by the sensor when a photographer takes an image. As such, it allows the photographer to process that information into a jpeg file. The result is higher quality. That’s the short answer, anyway.

A jpeg records 256 levels of brightness, and raw records between 4,096 to 16,384 levels. Obviously, that’s a huge difference. A photographer can use those levels to process the image without a loss of quality.

Sometimes, the action is happening so fast there can be an error in exposure. Under or over exposure can ruin a jpeg. With a raw image it’s much easier to correct. Also, since there are more levels to work with the white balance is easier to adjust. Plus, when working with raw format images you’re not actually working on the final image. You’re simply creating a set of instructions for how the final image (jpeg or tiff) should be saved.

Jpeg Format
Jpeg is a “lossy” format. Each time you open a file, make adjustments and save it, you lose some quality. Jpeg is the most widely used format and that’s a good thing, right? Not so fast. The camera has already processed the image. A camera uses “firmware” to determine how much sharpening, what the color will look like and sets the white balance, along with some other things. Letting your camera make those decisions can often result in image degradation.

As the most common image file format there’s naturally a place for jpegs. They’re generally a smaller file size and thus, easier to store. If you don’t mind the loss of quality, a jpeg might do the the job for you. If not, consider going with raw, if your camera offers that option.

PNG Format
PNG stand for “portable network graphic.” It’s a good choice for storing line drawings, text, and iconic graphics at a small file size. Plus, it offers transparency with PNG 8,s which jpeg doesn’t. As they are lossless and offer transparency they are a good choice for some applications such as the Web. The are larger files than jpegs. PNG should not be used for print work since they only use the RGB (Red, Green, Blue) color space and not CMYK (Cyan, Magenta, Yellow and Black).

GIF Format
GIFs are am image standard for the Web. Like PNG, the name is also an acronym. It stands for Graphic Interchange Format. They also offer transparency and animation. Their palette is limited to 256 colors. Given the limited palette the format isn’t suitable for continuous tone images. It’s best for works in flat color such as some logos and infographics.

TIFF Format
TIFF is a raster format suitable for the printing industry. It’s a lossless format and can be manipulated in an image editing application such as Photoshop. TIFFs have more tolerance for exposure errors. The downside is their size. TIFF files can be huge. They also can’t be scaled up in size due to jagged edges being visible. They can be scaled down, though.

Choosing the right file format can be tricky given the overlaps. As a rule of thumb, if the image is flat color, a logo for instance, go with GIF. The same goes when you need animation. If it’s a continuous tone image, such as a photograph, TIFF or PNG might be your best choice. Going to offset print a brochure, TIFF is your best choice. Need to save continuous tone images for the Web? PNG or Jpeg is the route.

In closing, know how the image will be used will make all the difference is you file format choice. Choose wisely.