Maryga

photo tips and tools

Image File Formats – JPEG vs. PNG vs. TIFF

As photographers, we are all committed to taking the best photographs we can. So we work hard at improving the look of our pictures, learning new skills and techniques to enable us to get better and better photographs. Then why is it that we let the fantastic pictures we take lose their initial quality by not putting them into the correct file format? It is something that is rarely addressed early but is so important for photographers to understand so they can safeguard those precious pictures.

File Format is the way an image is stored when closed and falls into one of two categories – LOSSY and LOSSLESS.

LOSSY compression methods can produce great reductions in file sizes but they are a destructive side to file formatting. If a format uses Lossy compression, it means that it removes some of the original file’s image information and throws it away. How much information is removed depends on how much compression you choose, but whatever original information is removed, that information is lost forever. It cannot be restored and the quality of the image cannot be recovered.

LOSSLESS compression methods still reduce down the file size of an image, but they do not produce the extreme file size reduction we see in LOSSY formatting. BUT….. Because the compression is LOSSLESS, this method of compression ALWAYS returns the file back to its original condition. There is no loss of data, so no loss of quality. The file is fully recovered back to the original, identical state before the compression was applied to store the file.

Different file formats have different ways of compressing the image down into a file that is stored either on a memory card (that you put into your camera) or on your computer’s hard drive. Each format type comes with its own set of pros and cons. We’re going to look at the three main types of File Formats most useful to a photographer: JPEG, TIFF and PNG.

JPEG

Probably the most widely used file format, and certainly one almost every photographer will be familiar with. Virtually every camera can take a JPEG image, (if you use a compact camera it is certainly the file format your camera used to write your pictures to the memory card), and is the most universally recognised file format for images on computers, viewers and photo printing kiosks, although other formats are now being recognised and used a lot more widely.

JPEGs use a LOSSY method of compression by modifying the information in each pixel. The image is examined to determine what the least amount of information can be used to reproduce the image. The resulting image file can be compressed down into an impressively small file size, but while this is very useful for saving space when storing images, it does come at a cost to the quality of the image over time, especially if they are edited several times.

Areas of tiny detail, such as minor colour changes, do not effectively compress down well, so they are disregarded – in effect they are overlooked and are deleted out of the image altogether. Larger areas of smoother colour start to appear as if they have little areas made of blocks inside. These are called JPEG ARTIFACTS and show that the image has had excess amounts of compression applied to it.

Each time you open and SAVE a JPEG image, the compression method will look at the image anew and apply the same level of compression to close the file down, but because it views the file as a completely new version, more of the quality is removed out of the image. Over time this gives an unpleasant look to the image as detail and definition are replaced by blur and artifacts. Because of this, JPEGs aren’t very good for reproducing text or graphics with a lot of straight lines in. But they aren’t all bad. They are great for web use, if you want a fast loading image on a website, or you want to send a picture via email or phone.

But probably the worst artifact of all is seen on the sharp edge that objects have which defines their shape. This edge starts to have a dark almost shadow-like edge around, blurring and concealing edge detail. Compression methods do not recognise shapes or edges. All the program is interested in is applying the right amount of compression. The greater the degree of compression you ask the program to apply, the greater the loss of integrity and detail from inside the image.

One little known element of viewing your JPEG images in some viewers (such as Windows Photo Viewer) is that if you have to rotate your image to look at it properly, it will resave the JPEG in the correct orientation, which re-subjects your image to compression and adds more artifacts.

JPEGs don’t support layers at all, so the images must be flattened before you can save the file in a JPEG format, which means all the editing you perform on a picture is irreversible once saved as a JPEG.

On the surface, JPEGs look to be the terrible mother of the photographic world. But JPEGs aren’t really a monster. Think where we would be without the ability to get more than 20 pictures on a memory card or having to wait another 5/10 seconds in between shots for a larger image to write to the memory card? How much space would be taken up on our hard drives if we couldn’t compress down our image files?

Used intelligently, JPEGs do a first-rate job in letting us record and communicate our photographs quickly and easily. The easiest way to prevent JPEGs from losing quality is to burn the files on to a CD or DVD. Once on a disc, the file cannot be changed, so no matter how many times you open it from the disc and print it or email it, you’re not going to degrade the base file at all.

But what if we want to edit our image but not lose any of the quality over time? If you have a special image, or something you want to change in the image, the first thing to do is save a copy of the JPEG into a LOSSLESS format, either a TIFF or PNG file format.

TIFF or TIF

TIFF file detailVery few cameras record images directly to the memory card as TIFF files, but the TIFF file format is rapidly becoming more widely recognised and accepted in picture kiosks and online photo printing site (such as Photobox, Snapfish, etc), as well as being increasingly used by both professional and amateur photographers to store images.

While JPEG is the file format of choice for camera images, TIFF is the most widely used and supported format within publishing, scanning and image-manipulating programs as the TIFF format was originally created for desktop publishing programs.

TIFF files are the most popular way to archive an image collection because TIFF files have a LOSSLESS compression method to reduce the size of the image file to store it. You can store TIFF files uncompressed, but this means that you will have a stored file that is the same size as the open file – anywhere from 25 to 50MB. Multiply that by a set of holiday snaps and you’re talking anywhere up to 6GB of hard drive space!

This LOSSLESS compression method (usually the LZW option in the file saving pop up) is a total, cast iron ASSURANCE that when the file is opened, every single byte of information will be restored and the file will be EXACTLY as if it had never been compressed. That means NO loss of quality, NO reduction in sharpness, NO artifacts being introduced and NO corruption of any file information no matter how many times you open, save and closed the file.

TIFF LZW compression looks in the picture information for identical strings of data that are repeated and then replaces the numerous repeated strings with just one string. The encoded strings let future programs decode and restore the image file back to its original state without any data loss or corruption. (The only thing you have to worry about is your own bad composition – heaven forbid!)

Because the image does not degrade over time with use, TIFF format is great for images that are precious to you, especially if you want to edit anything within the picture (such as colour, brightness, cropping, sharpness, etc) as well as images that have a lot of detail such as texture or colour, and for graphics such as logos, designs and other graphic images.

Tiff files also allow you to save files that have multiple adjustment layers and layer masks, so you don’t need to apply these and flatten images to save them. You can save files and continue editing them at a later date.

The downside to TIFF files (but it’s not a huge stumbling block) is that even with LZW compression, you will not get the kind of reduction in file size that you get with JPEG compression.

So it is a personal call which format you want to save each file as, because only you know what future use you have for your images, but if you are looking to develop your photography and want to safeguard the image quality of certain images, get into the habit of saving a copy as a TIFF file. Store them externally on a portable hard drive or disc if you want to keep space freed up on your own computer.

There is another LOSSLESS file format, the PNG.

PNG Format

PNG file format (pronounced ‘PING’) is not as widely known as JPEG or TIFF formats, and so people tend to shy away from it in confusion as much as fear. But this file format is a useful and wonderfully friendly version of formatting. It can do things the other two can’t and improves on the lossless LZW compression of the TIFF format.

PNG is the most recently developed between JPEG, TIFF and PNG file formats and was designed to both replace and improve on TIFF’s LZW compression, as well as to replace the use of GIF files in web use.

It is similar in quality and use to the TIFF file. It can be used as the format in which to store and protect the quality of image files without any loss or corruption of data, but PNG’s superior LOSSLESS compression reduces the overall size of the closed file down even further than

However, unlike TIFF files, it does not allow you to store a file with adjustment or editing layers without flattening the file first.

It is great for storing graphics and designs with text without affecting the look or quality of the image file. However, it is the poor cousin to TIFF when it comes to being recognised by photo kiosks and online photo print services, although this is changing as more and more sites begin to recognise the increase in PNG usage.

PNG formatting applies its compression in a complicated way, using what are known as pre-processing filters to filter the data before it is compressed and this allows PNGs to have a much more efficient LOSSLESS compression. You don’t need to know any more than that, unless you’re a bit of a geek, in which case you can do a bit more digging yourself! Suffice to say it works and it’s easy to save.

So why use PNG over TIFF? Well, apart from the saving in storage space you get with PNG compression, PNGs can do some interesting things; most of which are quite advanced but one is particularly useful for web use and design projects.

Both PNG and TIFF files will save images on transparent backgrounds, but PNG images will open on the web without putting a background in, whereas TIFF images can open with a white background embedded. This means if you take a PNG image that has been saved with a transparent background (such as a logo, web page header text, etc.) and put it onto a web page, the PNG will keep the transparent quality to its background, meaning you can layer them over other text or objects without any problems. Great for Header Banner text.

The choice is yours as to which File Format you ultimately use, but used properly, all three formats have their place within your folders.

The choice is yours as to which File Format you ultimately use, but used properly, all three formats have their place within your folders.

Checklist for Which File Format to Use

  • Image quality not overly critical – Use JPEG and save copy to disc.
  • Is the image special or precious? Use TIFF with LZW or PNG.
  • Do you want to edit a JPEG? Save a copy to TIFF with LZW or PNG before you begin and edit the TIFF/PNG file.
  • Do you want to store the file with layers still in? Save to TIFF with LZW.
  • Does your image have text, writing or fine detail in? Save to TIFF with LZW or PNG.
  • Does your image have text, writing, fine detail or a transparent background and is for web use? Save to PNG.

COMPARISON OF FILE COMPRESSION SIZES

FILE FORMAT COMPRESSION FILE SIZE WHEN CLOSED
OPEN IN EDITING PROGRAM 45.6 MB
TIFF UNCOMPRESSED 45.5 MB
TIFF WITH LZW COMPRESSION 17.2 MB
PNG 14.5 MB
JPEG HIGHEST IMAGE QUALITY (12) 5.77 MB
JPEG MEDIUM IMAGE QUALITY (7) 1.28 MB
JPEG LOW IMAGE QUALITY (4) 744 KB

Pin It