Monday, October 07, 2013

.JPG vs RAW (.PEF) vs .DNG

arning, I must preface this post with the advice that this is very much my personal view, based on my experience rather that on a calibrated benchmark comparison. I have the choice of using jpeg, two types of propriety RAW  and .DNG as an alternative Raw format on my Pentax K20D. I have found the decision as to which format to standardize on hard to resolve and opted to save both RAW+jpeg where there is the such an option. So here is a little about my (in)decisions and why.

All my current and past digital cameras and cameraphones have all captured .jpeg files and my photo collection is dominated by that format. I have come to appreciate picasa as the very best way to manage jpeg files, its fast, simple and behaves. My many mistress project has lead me to see that previewing jpeg thumbnails is by far my preferred way to cull and organise my photos as I load them. At this stage whilst I might do a little cropping I tend not to do any elaborate post processing. Occasionally at this stage I will email images and very occasionally upload them to the net which generally require resized jpeg version (again picasa does this well) without much photo retouching.

There is also no doubt in my mind that you can coax much more out of RAW files than you can get out of the equivalent jpeg. The reasons for this is buried in the image "development" process happening in the camera, to take the sensor readings and produce an image. There are several steps, demosaicing of the Bayer array, white balance assumption, tone mapping, colour saturation and contrast, then image compression before it is written to the camera memory card.. Probably the biggest limitation is that the image must be packed into an 8 bit representation. Each step requires interpretive decision about how to preform the development and many are not easily recovered if the steps lead to less than desirable processing. That’s where having access to the original information in a RAW format file is a big advantage, but now the steps must be specifically undertaken by the photographer, which takes time and experience. Often a lot of time! The jpeg representation, or at least a suitable small sized thumbnail of it, is also needed at the camera itself to be display on the LCD screen on the back of the camera. 
Pentax JPEG *** (5.9MB) Pentax JPEG **** (10.0MB)
Pentax JPEG *** (5.9MB) Pentax JPEG **** (10.0MB)

There is a trade off between the time take to write the large RAW files and the smaller jpeg files, which can mean that you can take fewer images per second, because there can be a bottleneck writing to the card, When you just shoot raw, the jpeg development steps are likely to be run anyway, not only for the image on the LCD screen but most Raw files also include this jpeg thumbnail, for use in quickly previewing the Raw file contents. So in RAW+jpeg both file formats must be written to you to your memory card and it is then just an issue of time taken to write both and extra space required. So fewer unique images fit on the memory card before it is full. Rather than opt for a larger memory card. I've chosen to have several 4 & 8GB cards that have faster read write access, so other than having to change cards more often I probably don't see much difference. There is one exception which is tracking birds in flight and I'll discuss this in a future post.
Pentax RAW  .PEF (13.2MB) Pentax RAW  .DNG (23.1MB)
Pentax RAW  .PEF (13.2MB) Pentax RAW  .DNG (23.1MB)
I have a Pentax which is one of the few manufacture that offer DNG as an alternative RAW format, Leica and Hasselblad are the only others I know of that can save to DNG in the camera. DNG can have one significant advantage, in my view, the files can be 15 to 20% smaller than the equivalent RAW files if they are lossless compressed. This is may be why many photographers have chosen to convert their RAW files to DNG on import. Anyone that has tried the convert on import into lightroom will know that this is simple but a very time consuming process, On a full card this is not just time for a quick coffee this is tme to have dinner and some. However when I choose that format on my Pentax K20D camera, the DNG files are uncompressed and they are almost double the size of the PEF files. Against this there are some differences, just differences not improvements, in how the images are rendered particularly in lightroom and I can't see any advantage capturing in DNG
Cannon JPEG (4.5MB) Canon RAW .CR2 (16.8MB)
Cannon JPEG (4.5MB) Canon RAW .CR2 (16.8MB)
Because of the time/file size trade-off I have stuck with using more compressed versions of the jpeg files (on my Pentax this is the JEPG *** rather than the uncompressed JPEG**** format) when using the RAW+jpeg. This compressed option is the only one available on my canon when using RAW+jpeg. The images posted above are all jpeg files of reduced size, so they can be dispalyed on the web. So it is not possible to show the subtle details and differences here. I have also uploaded the unedited files to my google+ JPEG vs RAW vs DNG photo album. If you are interested this may given extra insight.

So I hope you understand why I choose to store RAW+jpeg and have opted to stick with the PEF format (and .CR2) rather than use DNG from the camera. I do use the DNG format in some special circumstances but that’s for another post.This discussion is prompted by to my thinking longer term focus

 Thanks again to Jessica Hische for her great drop caps.

No comments: