13. How to Take Photos 8: Digital Image File Formats

Notes for this lesson come from Adobe.com, Simon d'Entremont and Chris Parker.

In this lesson, I divide file formats into those we use for photography, and those we don't. I've added a few we don't commonly use, just so you know what it is and what it's for.

Digital images come in two general types: Raster & Vector. Vector image formats, like PDFs and SVGs, can be resized larger or smaller without any change in the image, because they are made with mathematical equations (lines and curves), not pixels. Vector formats are better for logos, graphics, and illustrations.

Raster images are made up of pixels that can change drastically if resized, creating blur and other distortion. A good rule of thumb is that you can usually double the pixel size of an image before you start losing quality to distortion and blurring. If you ever take a photo you really love, double the size before saving, for the highest quality, and largest printing options.

JPEG's, GIFs, PNGs, BMPs, and TIFFs, are all Raster files. Raster files are best for digital photography. Vector files cannot edit specific parts of a photo with as much precision as raster file editing - where you can change a single pixel and not affect the rest of the image.

FILE FORMATS WE USE IN CLASS

RAW

RAW images are simply unprocessed, uncompressed digital images, scanned straight from a scanner or the digital sensor in your camera. They take up lots of file space because they hold tons of data - some of it redundant. Because they are so large, they are not ideal for use on the internet. Instead, they are great for printing images. There is no standard RAW format, as you will see below. RAW files are generally the highest quality you can make with a camera. If you need to take lots of photos rapidly, and your camera processer is slow, you may consider setting it to JPEG instead - a good practice for cheaper, student-quality cameras.

TIFF

The Tag Image File Format was first created in 1986 by the Aldus Corporation (later acquired by Adobe) as a standard format for scanning paper files. The first TIFFs were only black and white, but color TIFFs were coded and created by 1988. TIFF files are very large and store a lot of detail - they're great for high quality digital photos, especially for printing. They also enjoy "losless compression". A TIFF can also be a "container file" meaning the one TIFF file can hold several JPEGs or other files in "subfiles". This is meant for sending lots of small files in a bundle over the internet. When you first edit a digital image, it's best to save it as a TIFF for printing first, before converting it to a JPEG.

JPEG

The JPEG was created in 1992 by the Joint Photography Expert Group, a committee founded by the ISO, and using patents by IBM, Mitsubishi, AT&T, and Canon. JPEGS were created as a way to compress digital images at a 10:1 ratio, while minimizing loss to image quality. JPEGs were made exclusively for use with the internet - internet websites and programs all love JPEGS.

These experts chose algorithms and colors to prioritize, in order to preserve and even enhance the beauty of an image, while making it smaller.  For this reason, taking a JPEG with your digital camera is like putting it in Lightroom on Autopilot - your camera adjusts the colors and exposure to get a prettier picture that takes up a fraction of the space of a RAW file. It's a bit counter-intuitive as an artist to think of smaller (less detail/quality) as better - and they're not, they're missing lots of detail. But, at first glance, they will look prettier. RAW files may look flat and dull at first, but you have a greater ability to edit them. In 2000, the group tried to create a successor to the JPEG, the JPEG2000, but no one uses it. Most websites, including Schoology, aren't compatible with JPEG2000.

PSD

This is a Photoshop Document, a special file format created by Adobe for use in Photoshop. It's great when you're working on a complicated project, with lots of layers, and you want to save your progress in an unfinished state. Maybe your laptop's battery is low, and you don't want it to die without saving? Or it's lunch time? PSD documents are great for saving progress because they save all the different layers of your image. Remember, a JPEG can't have layers, it must be all on one layer. PSD files are used exclusively with Adobe Photoshop. Don't expect them to be compatible anywhere else.

XMP

This Extreme Memory Profile is a secondary "helper" file that pairs with either a RAW or JPEG file. XMPs are created automatically when you open a photo in Adobe Lightroom - don't be surprised when they appear in your computer folders. The purpose of an XMP file is to record and save all the edits that you perform on that photo in Lightroom - this is so the original file is never lost or altered. You can never open an XMP file by itself. It's not the image, it's the recorded history of what you did to that image. You should never rename an XMP file nor its partner file, or you will confuse Lightroom. It can lead to error messages.

FILE FORMATS WE DON'T (SHOULDN'T) USE WITH PHOTOGRAPHY

HEIC

This is a photo file format used primarily by Apple IPhones, starting in 2015, because they take up less space than a JPEG of the same quality. You can store more photos on your phone this way. Unfortunately, it's a file format that pretty much no one else uses, so file transferring is an issue. To post the work to Schoology or open it in Photoshop you must first convert the image into a JPEG. There are websites where you can convert images to JPEGs for free. If you use an IPhone, I recommend that you go to your camera settings, and under "Formats", choose "Most Compatible". This will save your photos as JPEGs instead of HEIC files, and save you a lot of hassle. Remember, JPEGs are already small, you don't need to go smaller.

BMP

The Bitmap is similar to a JPEG, but instead of little square pixels, it is made up of little square "bits" that can be shrunk or enlarged. While BMP files have no compression and can be quite large, they can be compressed with no image loss by creating a ZIP file. Unfortunately, any attempt to enlarge a BMP results in the appearance of "pixelation" as each individual bit gets large enough to see. Fun fact: JPEGs, GIFS, PNGs, TIFFs, PSDs and RAW files are all just different kinds of bitmaps. Different algorithms, same basic principle.

GIF

The Graphics Interchange Format was created in 1987 by CompuServe, under Steve Wilhite. A GIF (pronounced either ghif or jif) is a kind of bitmap image, with a limited color palette of 256 colors. This makes them ideal for simple graphics and logos, but not for photography. GIFs are popular on the internet because of their small file size, and the ability to animate them. Recently, they have begun being replaced by larger MP4 files that look nicer - now that the internet is able to process data faster, the smaller GIFs are no longer required.

PNG

The Portable Network Graphics format was created in 1996 as a replacement for GIFs, to be higher quality, offering a much wider range of colors, and able to compress to smaller file sizes without loss of data (i.e. image quality). PNGs are intended for use on the internet, not for printing images. Unlike GIFs, PNG files cannot be animated. However, in 2008 Mozilla created an animated version (APNG). 

PNG files may be larger or smaller than the same image as a JPEG, depending on the image. Photographic images will always be smaller files as a JPEG. But, solid color graphics, like logos and text graphics, are able to compress to much smaller file sizes as a PNG.

WEBP

WEBP files were created by Google in 2010 as a smaller alternative raster file to JPEGs. They're becoming quite popular on the internet, so that JPEGs are getting harder to find. One annoying fact about WEBPs is they're impossible to download. That is, you can download them, but then most picture viewing software won't load them - neither will Photoshop. I think certain websites like this because it makes them feel safer about showing images that can't be stolen. But, it's silly - of course they can still be stolen. If you see a WEBP file you really like, and want to use, instead of saving it, you have to copy it. Then you can paste the image in Photoshop and save it as a JPEG. It's just an extra annoying step in the saving process. Having said that, DON'T STEAL IMAGES OFF THE INTERNET FOR ILLEGAL OR UNETHICAL PURPOSES.

JPG Vs. RAW

Which is better for professional photography, RAW format or JPGs? JPEGS are compressed files, in which a certain amount of data is lost at the start, and these files tend to degrade and/or corrupt the more you save them. RAW files hold more information longer, and they also do better in post-editing software. Lightroom is specifically designed for RAW files. Photoshop is not. It is designed for JPEGs, and if you try to open a RAW file in Photoshop, it will trigger the CAMERA RAW extension - a small program that acts like Lightroom, and allows you to manipulate a RAW file before exporting it (saving it as a different file format, like a JPEG) so that you can actually open and work with the image in Photoshop.

 The conventional wisdom is that RAW files are better, and many pros will tell you as much:


Examples by Chris Parker

But it's not so simple. Both formats have benefits, worth considering. Here's a good video by Simon d'Entremont that explains:

Some of Simon's best points:

1. You can control your picture style when you set your camera to JPEG. Go to your menu settings and look for Picture Styles (Canon), Picture Control (Nikon), Film Simulation (Fuji), or Picture Profile (Sony). These pre-settings can change the look of your photos without needing to go into Photoshop or Lightroom. It might not look the best, but it gives you some control over your style, and it's faster than using Photoshop or Lightroom. Whichever setting you use, JPEGs usually do a good job of improving the look of the photo, without post-production enhancements.

2. JPEGs have a bit depth of 8 bits, as opposed to 14 for RAW files. This means JPEGS have a more limited color palette. This limitation is most obvious with gradients, like in skies, where annoying lines may appear.

3. JPEGs tend to lose the most information in highlights and shadows. So, it can be frustrating when you try to improve the exposure settings in those areas - you just reveal flat, featureless space, where the RAW file would still show details:

When I took this photo of Lily, I didn't realize the camera was set to JPEG. The photo's ok, but I was sad to see all the white highlights where there was no detail at all. With a RAW format, I could've brough back those details by toning down "Highlights" in Lightroom.

Even weirder, if you lighten shadows in a JPEG it can reveal a greenish color.

4. RAW images give you more freedom to adjust white balance after you take a photo. You can change it in Lightroom with one little button. But, it doesn't work with JPEG images.

5. RAW files are much larger than JPEGs. If you are a professional photographer, and you need to store thousands of files long-term, you have to pay for that, either online or with external hard drives. You can save hundreds, if not thousands of dollars a year, by saving your images as JPEGs. Be warned, however - I've done this for decades, and every once in awhile I'll open up a folder to find my JPEGs have become corrupted. Once that happens, those photos are dead.

6. Because RAW files are so much larger, they take more time for your camera to process as you shoot photos. If you want to shoot rapid fire at a moving target, like an athlete or a running horse, etc - you'll be able to take many more photos with JPEGs than RAW. I've found with my 2013 Rebel EOS I can shoot 5 RAW photos rapidly before buffering slows the camera down. With my school's 2018 Rebel T7's, I can shoot 10 rapid RAW photos in a row before buffering gets in the way. This is a question of your camera's processing speed.

7. Depending on the job, you may want to shoot JPEGs in order to send them to your boss quickly - say at a sporting event. JPEGs are smaller, so they're easy to send via bluetooth or wifi, and their format is universally accepted online.

8. Unfortunately, there is not one standard file extension for RAW images. Every camera and printer company make up their own. Here are some common ones:

Canon: .crw, .cr2, and .cr3

Nikon: .nef, or .nrw

Sony: .arw, .srf, or .sr2

Kodak: .dcs, .dcr, .drf, .k25

Fuji: .raf

Panasonic: .raw or .rw2

Pentax: .pef or .ptx

Samsung: .srw

Epson: .erf

GoPro: .gpr

Adobe: .dng - a format Adobe hopes will become universal. It is also smaller than most other RAW formats, without a noticeable loss in image quality.

You don't have to know all of these, just look at your camera's brand, and then look in the menu settings for the RAW options available to you. And pick one. You will see exactly what kind of RAW file your camera makes, when you save it to your computer. Note, because there are so many kinds of RAW files, you may have compatibility issues.

Comments