Should I Shoot RAW or JPEG? What’s HEIF?

While many photographers are familiar with RAW images, not everyone is, and there is some misinformation out there as well. In this post, I discuss the differences between RAWs and camera-generated JPEGs, the advantages of each, and ways to decide which is best for you. I also discuss a new file format called HEIF.

 

What is RAW?

A RAW file contains the image as captured from the camera’s digital sensor, with minimal to no processing. Decoding software on your computer or device is required to turn this sensor data into an image on screen. Decoders also improve with time, so RAW files shot ten years ago often look better now, than they did when originally decoded. On the downside, different decoders will produce somewhat different results for the same RAW file.

 

Camera-generated JPEGs

JPEG is a standard file format and JPEGs look the same on all computers. All digital cameras capture RAW data, but they do not necessarily offer a way to store that RAW data in a file. Instead, cameras have specialized hardware to convert that RAW data to a JPEG file. You can influence this conversion in many cameras through their on-board menus. The controls are quite extensive in higher-end cameras. Many cameras also have built-in styles or scenes for challenging shooting conditions (like indoor portraits or fireworks). The most important thing to realize is that once the camera makes the JPEG, much of the image’s appearance is locked down and some image data has been discarded. This is not true of RAWs. RAWs contain all the data about the shot, and anything in a RAW can be changed afterward.

 

It’s Like Carry Out vs. Cooking at Home

Camera-generated JPEGs are like carrying out food from a restaurant. You usually get a nice meal, made by a professional. However, if you want it mild and the restaurant makes it spicy, you can’t completely eliminate the spice. If you ordered a pizza and the bottom is a little burned, you can’t unburn it. Similarly, you cannot turn a black and white JPEG back into color – the color information is lost. If the camera uses aggressive noise reduction and loses detail, then that’s what you’re stuck with.

Editing RAWs is like cooking at home. You can substitute freely, and you can adjust the recipe as you go. You may make mistakes but you can also correct them before you serve the dish. But it’s more work and takes more time (and like a well-equipped kitchen, you need better gear, like a faster computer and more storage space). Advanced photo editors give you full control over the RAW’s appearance.

 

Advantages of RAWs

RAWs can store all of the detail and color richness that camera sensors can record. JPEGs cannot. To explain why, let’s talk briefly about how color or gray is represented in a computer. If you want to represent black or white, you need one digital “bit” to store that. If you need to represent black, white, light gray, or dark gray, then you need two bits, as shown below:

The more bits, the more shades of color or gray you can represent. JPEGs are limited to 8 bits while RAWs can store 16 bits.

Standard digital cameras have a grid of sensor cells that are sensitive to either red, green, or blue light (a bit like the cones in the human eye). Each cell can capture a brightness value from 0 to as high as 16,383. RAW files can store the entire range of values, but because JPEGs are limited to 8 bits, they can only store brightness values up to 255. When a sensor records a brightness value larger than 255, the number is clamped to 255. This can be devastating to bright areas of the image:

The difference is staggering. RAWs can store over 260,000 times (!) more color information than an equivalent JPEG from the same camera. RAWs can simultaneously capture much darker and brighter parts of a scene (the “dynamic range”). That adds up to richer, higher quality images.

To be clear, the value of 255 is still considered “white”. When a RAW stores a large value like 1024 or 3234, those values are “brighter than white” or “super white”. You cannot normally see such super white colors on your screen, but a RAW editor lets you work with them and bring them into view. In contrast, when your camera makes a JPEG from sensor data, it makes a decision about what is “white” and what is “black.” Areas darker than this “black” value are clamped to black, and areas brighter than white are clamped to white. The extra information that the sensor captured is lost forever.

With a RAW, you can reveal at least 2 stops of detail in over-exposed (bright) areas. This is impossible to do with a JPEG. Similarly, while a JPEG has a fixed value of zero for black, the concept of black is controllable in a RAW (this is called the black floor or black point). The camera (and decoder) will have a definition of black, but you can raise or lower this definition while you edit. This can be a life-saver if all the detail in the darkest areas of an image has been smashed into a black smudge.

Here are two good examples of recovering detail. In both examples, the left image is the original RAW. For the middle image, I lowered the exposure by 2 stops, and lifted the shadows. The right image applies the same exposure and shadow operations to a JPEG. (I can make the RAW look better than this using RAW-only controls, but I made sure to do exactly the same operations on both the RAW and JPEG).

The background color and detail is revealed in the RAW, but the background in the JPEG just gets murky and gray. That’s because the camera recorded bright data in the RAW (a variety of values of 1000 or higher), but that same data was clamped to 255 in the JPEG before I could work with it. I should also mention that RAW files store “linear” data, while JPEGs store “gamma-corrected” data. Gamma-corrected data matches the way our eyes perceive light, but gamma-corrected files squash bright areas of the image, making them even harder to edit. A full discussion of linear vs. gamma corrected will have to wait for another time.

RAWs have a wider range of colors (brighter and more saturated) than most JPEGs. This range is called the color “gamut.” While some JPEGs also have a wide color gamut, such as P3 photos taken from newer iPhones, the 8-bit limitation of JPEG becomes an issue, causing banding in some images. Banding causes areas that should have a smooth transition of colors to show obvious lines or blotches. This can be particularly noticeable in the sky. Banding occurs because 8 bits is simply not enough to represent all of the colors defined in the Display P3 or the Adobe RGB color spaces. This artifact does not occur with RAWs because 12 or 14 bits is generally sufficient for P3 or Adobe RGB.

RAWs can be white-balanced better than JPEGs (especially underwater and other extreme lighting situations). In addition, after white balancing a RAW, highlights can turn out better.

Noise reduction and lens correction are much better when done to a RAW than a JPEG. This is because the best time to make such corrections is super-early in the decoding process, before changes in color or brightness have occurred. If you noise reduce a JPEG, the image has already been significantly manipulated by the camera (or software), and critical information has been lost. Some cameras have built-in lens correction for JPEGs, but not all of them, and the corrections are less sophisticated than computer-based software.


A Bit about “HEIF”

Apple has recently popularized an image format called HEIF (High Efficiency Image Format). Pronounced “heef,” this is a standardized and general-purpose format that has many improvements over JPEG, such as support for 12 and 14 bit images, and more efficient compression, which results in smaller files for the same quality. While HEIF has the ability to address a number of the weaknesses of JPEG, images shot on iPhones with HEIF are still 8-bit, and the images have been significantly processed by the camera. In practice, the advantages I list for RAW are still valid for iPhone-generated HEIFs. Apple uses the .heic file extension — those are HEIF files using a specific compression technology. HEIC-based files are roughly half the file size of equivalent JPEGs, which is a big savings, both in cloud storage and on your device.


JPEGs have their place…

I’m not saying that one cannot white balance a JPEG, or perform noise reduction to one. It just doesn’t turn out as well. JPEGs offer their own advantages. Modern cameras produce outstanding JPEGs for well-exposed images. In addition, through a field called “computational photography,” cameras can often generate high-quality JPEGs / HEIFs that exceed what’s possible with a RAW. For example, newer iPhones will often take multiple exposures and combine them into a single high-quality image. This happens automatically – you just see the one final image. These techniques help a lot in low-light, and iPhone JPEGs have less digital noise than an iPhone RAWs. Many iPhones can also create pleasing portrait images with nicely blurred backgrounds.

Panoramas and HDR images are other examples of useful built-in camera features, both of which require a lot of time and effort to replicate using multiple RAW images. Regardless, note that all camera JPEGs have the limitations listed above in terms of editing, dynamic range, sharpness, etc.

FeatureWinner
Smoothness of Colors (bits)RAW
Dynamic Range (bright and dark parts)RAW
Highlight RecoveryRAW
White BalanceRAW
Overall Editing FlexibilityRAW
Minimizing Compression ArtifactsRAW
Wider Color GamutUsually RAW
Noise Reduction / Lens CorrectionUsually RAW
Best looking right out of cameraJPEG / HEIF
Easy Panoramas / HDRsJPEG / HEIF
Smaller FilesJPEG / HEIF
Burst Mode SpeedJPEG / HEIF

Conclusion

RAWs are 16-bit lossless files containing all the information captured by the camera. They have superior color detail, a wide color gamut and extended dynamic range. They offer much better exposure and white balance latitude. They are better suited for lens correction and noise reduction as well.

On the downside, RAWs take up more disk space and take longer to open. RAW Power uses the GPU heavily, so for RAW Power, it’s best to have at least a mid-range Mac that is relatively new (within the last 5–6 years). On iOS, an iPhone 7 or later works well.

For 12 or 14-bit HEIF files, the RAW advantage is lessened, but still present, because RAW files are minimally processed, allowing the maximum latitude when editing. Remember, though, that iOS devices do not generate 12 or 14-bit HEIF files — their HEIFs are only 8 bit.


Bottom line

  • If you primarily “shoot and share” with little or no editing to your pictures, then shoot JPEG / HEIF.
  • If you are generally happy with the look of the JPEGs from your camera, shoot JPEG (or RAW+JPEG).
  • If you want panoramas, HDR, and portrait images as easily as possible, shoot JPEGs.
  • If you have limitations on disk space, or if you are going to shoot thousands of pictures quickly on a tight deadline, shoot JPEG (for this reason, professional sports photographers often shoot JPEGs).

Otherwise, if you want the best possible results, and the most flexibility when editing your images, shoot RAW. Your future self will thank you.

What do you most miss from Aperture?

I get many emails a day requesting features for upcoming releases, and questions about RAW Power in the context of Aperture.

While RAW Power is not a replacement for Aperture, I do know many customers have or had Aperture and really loved it.

I’m embedding a poll here for people to vote on their favorites.

To be clear, I’m not making any promises. I think it’s valuable for people to see each other’s opinions on this. That said, I’ll start the voting 🙂

If I missed your favorite feature, add that to the comments. If you didn’t use Aperture, but have favorite features in Lightroom or other apps, feel free to chime in as well.

What do you miss most from Aperture (choose up to 5)

View Results

Loading ... Loading ...

 

RAW Power 2.0 for iOS

RAW Power 2.0 is now available!

Like its companion, RAW Power for Mac, iOS version 2.0 will be shipping very soon!

If you are a current customer and would like to beta test the new version, tap or click here to email us. Please include what kind of iOS Device you intend to use with the beta build.

Beta testing is now closed.

RAW Power 2.0 runs on iOS 11 and 12. The hardware requirements are the same as before (so no iPhone 5s, 6, or iPad mini 3 or earlier).

Here is the list of improvements for Version 2.0:

  • New Adjustments
    • Chromatic Aberration*
    • Perspective
    • Black and White (a Monochrome Mixer)
    • Vignette with Controllable Center Point
    • Enhance including Definition
    • RAW Processing: enable / disable Lens Correction when available
      • (this is the existing [limited] lens correction with an on /off switch
    • Adjustments are 100% compatible with the Mac version and sync through iCloud Photo Library.
  • Presets
    • A selection of built-in presets
    • Ability to create your own
    • Undoable
  • Workflow improvements
    • Share to Photos
    • Export to Photos (TIFF, PNG, 16-bit images, etc)
    • Delete will consistently advance the selection forward to the next image
    • Paste Last Edit is an option in Batch Processing so you don’t have to explicitly copy in Edit before doing the batch operation
    • Adjustments can be rearranged (good for small screens). This does not affect the processing order.
  • UI Improvements
    • Indicator for which adjustments have been applied to an image
    • Space-saving UI design limits the number of adjustments that are visible at a time.
    • Easier to use sliders in landscape device orientation
  • Batch Processing in the Grid** (See important note below)
    • Batch Apply Presets
    • Batch Paste of Adjustments
    • Batch Revert to Original
    • Batch Generate JPEGs for RAWs

*Note: Chromatic Aberration, Vignette, Perspective, and Black & White will be part of Advanced Adjustments Pack #2, which is inexpensive in-app purchase (not part of the current Advanced Adjustment Pack #1). Enhance will be bundled with the app and not require an in-app purchase. Beta testers will receive a promo code to get the in-app purchase for free when it’s released.

**Batch Processing is still under development. Because iOS has a very limited memory and background processing model (compared to the Mac), it is not certain that this feature will make it into version 2.0. You’ve been warned 🙂

RAW Power 2.0 for Mac Is Coming!

RAW Power 2.0 is now available!

RAW Power for Mac 2.0 will ship in the next few weeks, and it will be a free upgrade!

If you would like to beta test the new version, tap or click here to email us. Please include what kind of Mac you intend to use with the beta build. ** Current customers only **

Beta Testing is now closed.

Important Note: RAW Power 2.0 runs on macOS High Sierra and Mojave. It does not support macOS Sierra.

Here is the list of improvements for Version 2.0:

New Adjustments

  • Chromatic Aberration
  • Perspective
  • Black and White (a Monochrome Mixer)
  • Vignette with Controllable Center Point
  • Enhance including Definition
  • RAW Processing: enable / disable Lens Correction when available
    • (this is the existing [limited] lens correction with an on /off switch)

Features for the Standalone App:

  • File Browser – browse folders on your disk, establish favorite folders
  • Batch Processing in the Background
    • Batch Apply Presets
    • Batch Paste of Adjustments
    • Batch Revert to Original
    • Batch Export with Custom Naming
    • Background Processing Task View
  • Multiple Windows
    • Multiple Browser Windows (View different parts of your disks at once)
    • Multiple Editor Windows (Open and edit multiple files at once)
    • Full Support for Tabbed Windows
    • Collapsible Panels
  • Thumbnail Grid
    • Control over thumbnail sizes
    • “Adjusted” badge in the thumbnail grid
    • Filter to show RAWs only
  • More metadata information including a map
  • Quick Look
  • Full Dark Look in macOS Mojave

What features are you most interested in?

RAW Power 1.1 for iOS is now available

Free download on the App Store.
Video demonstration of the new features here

RAW Power for iOS version 1.1 – Approaching Beta Test!

Version 1.1 is feature complete. We plan to start beta testing in a couple of weeks. If you have time to beta test the iOS app, tap or click here to email us.

Here is the list of improvements scheduled for version 1.1:

  • Hierarchical View of Library (support for folders [created on the Mac] in Album view and Inspector)
  • Filter images to only show RAWs (per album and a special RAW Smart Album as well)
  • Delete Button in 1-up
  • Export images to Files.app as TIFF, PNG, JPEG with a selection of color profiles and bit depths.
  • Improved Share: images are shared at the highest possible quality (including sharing originals when possible)
  • Revert to Original works in all cases (sometimes requiring a download of images)
  • When Sharing, images get the original’s file name (not “FullSizeRender” or something like that)
  • In Info, RAWs display the full pixel dimensions of the file (not the size of the embedded JPEG)
  • Preference to set the DPI when exporting or saving images
  • Preference to set JPEG export quality
  • Curves samplers uses the median pixel value, not the mean
  • Improved adjustment layout when screen is in portrait orientation
  • Guided tour can be easily skipped
  • 3D Touch for delete, share, and favorite in 1-up
  • Preference for the inspector location (left or right side)
  • The current adjustment tool in portrait is tinted blue
  • When in portrait, the histogram location is preserved
  • Fix bugs in zoom, where the image would become fuzzy either temporarily or get stuck that way
  • Easier to use Black and White points for Curves
  • Info Panel: Camera and Lens fields are combined to provide more information
  • Show all of Curves adjustment in portrait
  • Fix bug where sometimes edits would not be persisted even when pressing the Done button
  • Added Hide Thumbnails menu to Edit
  • Added Auto Histogram which hides the vertical histogram when not moving a slider or using a sampler
  • Show Original is now the “m” key and is a sticky setting you toggle on and off.
  • Improved appearance of badges in thumbnail strip
  • Option for larger thumbnails in Preferences
  • Detect HEIC files and display them as such in Info (instead of displaying “Image”)
  • Remember if Info panel is expanded in portrait and preserve that.
  • Show Live, HDR, and Portrait icons in Info
  • Map now has a Re-center button
  • If you Select images, the select state is exited automatically in more cases to make it easier to use.

How RAW works on iOS

UPDATE 11/16/2018: Support for RAW has improved in iOS 12. The major difference is that the Photos App on iOS can now edit RAW images natively. That said, Photos will still show the embedded JPEG until you enter Edit, so you still don’t see the RAW most of the time on iOS. Also, on iOS 12, it is not possible to develop a RAW Photos extension for iOS, because extensions are always passed a JPEG. I have filed a bug against Apple (with a solution). Hopefully, they will fix that some time soon.


RAW has been (minimally) supported on iOS for a long time. You could import them directly onto an iPad for example. However, when you looked at the RAW on iPad, you could only see the embedded JPEG. Apple added support for RAW decoding in iOS 10, but despite that, most of the time, you are still looking at the embedded JPEG. In this post, I will describe what is really going on and how to make the most of your RAW files on iOS.

Embedded JPEGs:

The embedded JPEG is a camera-generated JPEG stored inside the RAW file. This JPEG uses the camera manufacturer’s algorithms and will look different from the actual RAW. Sometimes the difference is relatively subtle (color, noise reduction, or sharpness), but other times, the difference can be quite striking. For example, embedded JPEGs receive any “picture styles” set on the camera, so if you set your camera to “monochrome”, the embedded JPEG will be black and white, while the RAW will remain full color. In addition, many cameras do not produce full-size embedded JPEGs. Common sizes for small embedded JPEGs are: 640 x 480, 1920 x 1080 (2 megapixels), and quarter-resolution (e.g., for a 20 megapixel camera, the JPEG is 5 megapixels). It’s hard to judge an image when you are only looking at 10-25% of the pixel data!

Here is a link to a RAW file that demonstrates the problems with embedded JPEGs. Import it and view it in Photos.app. This is a 20 megapixel RAW from a new Panasonic G85. It makes a 1920×1440 embedded JPEG. The embedded is black and white, because I set the picture style to Monochrome. RAW Image

Apple RAW Camera added in iOS 10:

Apple added support for viewing and editing (and capturing) RAW images in iOS 10. However, applications must opt-in to RAW (for backward compatibility reasons). The built-in Photos app does not opt-in. Nor does the built-in Camera app. So by default, you cannot capture, view, or edit RAWs on iOS, even though Apple’s RAW Camera software is capable of decoding hundreds of RAW camera formats. On the plus side, RAW images get synched over iCloud, and sent properly via AirDrop.

Another confusing aspect of RAW on iOS:

As mentioned earlier, most of the time you are looking at the embedded JPEG. To preserve the illusion for apps that don’t support RAWs, Apple APIs do not return correct information about the RAW. For example, if an app requests the pixel dimensions of a RAW image through the standard ImageIO framework, Apple’s code will lie and return the size of the embedded JPEG. To get the correct size, one needs to use Apple’s RAW Camera code. This is not true on the Mac. The same ImageIO call on the Mac returns the RAW’s image size, as expected.

Working with RAW:

If you are going to import on iOS, then you will definitely want a RAW editor (like RAW Power) that natively understands RAWs. If you edit an image in the Photos library (using any app), then you will end up with two images: the original RAW and a JPEG that is the result of the editing process. iOS will also store the adjustment data so that you can edit non-destructively. Though there are two images, you can only see one at a time.

If you want to back up your data using something like Dropbox, then you will probably want to back up the RAW first. Then edit and back up the JPEG. If you are using iCloud Photo Library, then both images will be synched to the cloud for you.

If you have questions about RAW, post them here. I will update the post or respond to your comments below.

UPDATE (2/14/18):

RAW + JPEG:

When shooting RAW + JPEG, both iOS and macOS will combine the pair of images into a single “asset.” On iOS, the JPEG is always the image shown and edited. On macOS, the JPEG is the image shown by default, but you can switch the display to show the RAW instead. Whichever image you are displaying on macOS is the one you will edit. RAW Power for iOS shows the JPEG by default also, but if you enter Edit, it will show and edit the RAW.

RAW Power Plugin for Lightroom Now Available

I have added a much requested feature to RAW Power — Lightroom support. There is now a plugin you can download from the website ( RAW Power Plugin for Lightroom), which you use with the just-released RAW Power 1.4.

There is a short video that shows how it works as well: ( https://youtu.be/4suoyktLxqw )

The plugin support non-destructive editing (including roundtrip editing between LR and RAW Power).

It works with Lightroom Classic and earlier (not the [feature-limited] Lightroom CC 2017).

Try it out and let me know what you think!

On Plug-ins

I spent some time the last few days playing around with an Aperture Plug-in. My idea was to create a plug-in that could address a big problem for those of us still using Aperture — lack of camera support. The macOS blocks new camera support from Aperture, so the two new cameras I bought recently get the dreaded black “unsupported image” square when I import their images.

I figured that if I could write a plug-in that could decode images (using the RAW Power engine), I could output TIFFs back to Aperture, and all would be well. Once that worked, I could make something more sophisticated that could allow editing of images by invoking the RAW Power app. Sounds good.

After some rummaging, I was able to find a download link to the Aperture SDK, and was actually able to build and install a sample plug-in. Kind of amazing, really. I started getting excited about the prospects and then a bucket of cold water got dumped on my head: if an image is unsupported, Aperture refuses to send it to a plugin. A bunch of work down the drain.

Then I tried the other kind of Aperture plug-in: the export plugin. A bucket of iced tea this time. Aperture sends the unsupported file (yay!), but shortly after that, Aperture throws an exception and crashes (no!). The crash only happens with unsupported images and I can’t catch or block the exception. Close, but another dead end.

This brings up a question: is there any reason to write a RAW Power plug-in for Aperture that works for supported images? I can’t think of one, though I have gotten requests for it many times. Maybe those requests are for camera support, which won’t work.

If not Aperture, would plug-ins be truly useful for Lightroom, or maybe Luminar / Photoshop / Affinity? If you have an opinion, please comment below.

Happy New Year!