|The sensor | Color reproduction | High-bit color | JPG vs. RAW: Wrong Question!|
|Why and when JPG? | Why and when RAW? | Conclusion|
The question about what is the “best” file format for digital photography is probably one of, if not THE most debated topic on Internet forums, and the arguments pro and contra are mostly biased, ill-informed and – thus – not exactly helpful for starting digital photogs.
The second most debated topic is probably which is the most appropriate color space to use, on-camera and on the processing system (computer and digital editing software).
Since these topics are closely related, I will try to clarify them simultaneously, building on a post I did on the Flickr D90 group.
Both RAW and JPG have their particular advantages and disadvantages, and which is the “best” for any given photographer is decided by his or her preferences, workflow and target-systems (where is it going to be used: web, home-printing, newspaper, brochure, billboard?).
I, for one, would never recommend a DSLR newbie to start out with RAW, simply because there is far too much to learn already, without diving into the extra investment and steep learning curve of advanced RAW processing.
Furthermore, even among advanced photographers there is a great deal of misconception about the pros and contras of either format, which often leads to useless and sometimes overheated discussions.
To be able to put the advantages and disadvantages of JPG and RAW in a clear perspective, it is fundamental to understand how a DSLR captures images, what color management is good for, what the differences are between the 8-bits and 16-bits file formats and why this relevant.
For those who are only looking for a justification of their opinions on either one or the other, be my guest: just jump straight to the JPG and RAW chapters.
However, if you want to gain some understanding about how the concepts behind these two file formats differ, just read on...
Sensors in digital cameras capture the light visible to the human eye (380-750 mµ approx.) with the help of a Bayer filter, which splits and arranges the total visible spectrum of light into the tree primary additive colors Red, Green and Blue (RGB).
The sensor itself is “patterned” in a so-called Bayer arrangement, with pixels sensitive to only one of these three wavelengths, in the proportion 25% Red (620-750 mµ), 50% Green (495-570 mµ) and 25% Blue (450-475 mµ), and is therefore also called RGRB.
This system mimics the human eye, which is more sensitive to yellow-green. This is why in the Bayer array half of the green pixels – 25% of the total – are “luminance-sensitive” (sensitive to brightness and shadow), while the remaining green, the red and the blue pixels are denominated “chrominance-sensitive” (sensitive to color).
The sensor saves these color data to memory into three, separate, so-called RGB channels.
RGB sensors are capable of capturing wavelengths beyond the capacity of the human eye, especially in the infrared, which is why they feature special filters to exclude this part of the spectrum (beyond 750 mµ), while falling slightly short in the violet spectrum, where humans can see hues down to 380-400 mµ, while sensors start around 450 mµ.
As a consequence, the RGB color space has some limitations in the blue-violet spectrum, where it is not entirely capable of reproducing the saturation or tints (pure color to white), hues (pure colors without tint or shade) and shades (pure color to black) the human eye is capable of distinguishing.
From sensor to monitor: color reproduction
To reproduce the data captured by the sensor on a monitor, imaging software recombines the captured RGB channel data in order to reproduce them in such a way that the human eye perceives them as “natural”.
The standard 8-bits sRGB model, used in JPG images, most Internet browsers and monitors today, is capable of reproducing 2 to the 8th = 256 tints/shades (pure color to white/black) per RGB channel; for a total of 256*256*256 = 16,8 million colors.
In consequence, the typical RGB “color picker” is subdivided in 256 steps per channel, from 0 to 255, where 000-000-000 represents black and 255-255-255 represents white.
By mixing the different shades of Red, Green and Blue, we can create a wide array of colors, like for example:
255-000-000 = Red
000-255-000 = Green
000-000-255 = Blue
255-255-000 = (Red+Green) Yellow
000-255-255 = (Green+Blue) Cyan (light blue)
255-000-255 = (Red+Blue) Magenta (dark pink)
With the 8-bits sRGB color space capable of reproducing 16,8 million colors, and considering that the human eye is capable of distinguishing at the very most 10 million colors and about 150 shades, this seems already excessive.
However, there is a catch.
When recombining the color channels to “calculate” and render the originally captured colors in any given color space, the sRGB system uses only integer numbers (without decimals), which, in the case of low-bit images, may result in relatively large rounding errors.
This leads – in turn – to the exclusion of colors/shades which the human eye is capable of distinguishing, but that are “out of gamut” for a given color space, an expression to indicate that it is incapable of reproducing them.
By “squeezing” the entire spectrum of visible light into a color system with a tonal range of only 256 steps (tints/shades), it is not always possible to “trick” the brain into seeing one continuous tone or gradient.
In addition, when the system encounters an out of gamut color, it “jumps” to its next closest neighbor (most similar color), which may result unacceptable to the human eye.
In this case, a phenomenon called “banding” becomes visible: the breaking up of colors with “striped” transitions from one color shade to the next, while in transitions from color to white RGB channels typically “clip” (blow out) at different points, causing strangely colored transition areas.
This is the reason it is of essence to protect the highlights in digital images, making sure there is always a minimum amount of tone in the whites.
|Continous gradient (top), banding (bottom)|
These image defects may also occur when converting low-bit files from one color space to another, where the system tries to adapt or adjust the colors present in the source color space (like Adobe RGB) to the target space (like sRGB), which may result in strange color shifts, posterization or dithering.
This is particularly noticeable when converting from a 8-bit color space with a relatively narrow gamut to one with an even narrower gamut, like from 8-bits sRGB to 8-bits CMYK (4-color pre-press) for example.
In this particular case, some of the greens, reds and purples are literally obliterated, while blues – skies, for example – lose a considerable amount of saturation and clarity, which is virtually impossible to recover.
|Various RGB spaces compared to CMYK (2200 matt)|
High-bit color systems: 12-bits, 14-bits and more
This is where high-bit color comes in: in digital photography typically 12- and 14-bits for RAW files and 16-bits for digital editing software.
A 16-bits file contains 2 to the 16th or 65.536 shades per channel, for a total of 65.536*65.536*65.536 = 281 TRILLION colors, compared to sRGB’s mere 16,8 Million.
This does not only considerably reduce rounding errors, but also enables the reproduction of a wider range of colors/shades than sRGB is capable of “holding”, which is why 16-bits files are best combined with a so called wide-gamut color profile, like Adobe RGB, CIE RGB or ProPhoto RGB.
Even if the considerably wider gamut and higher bit rate of an image may not be reproducible on a standard sRGB system, editing, retouching or converting high-bit images will still show the aforementioned image defects on sRGB computer monitor if anything were to go really wrong.
Furthermore, conversion from wide gamut color profiles to narrow ones, like – for example – CMYK, offers the system considerably more “closest next neighbor” alternatives, resulting in more precise color conversion and notably less loss in color fidelity.
JPG versus RAW? Wrong question
The discussion over which of these file formats is the “best” has been raging practically since the introduction of RAW capable digital cameras – a decade ago – and is still in full swing.
Clearly, each has its fanatics who defend their points of view with equal verve.
With more than 36 years in pre-press, 12 in digital photography, of which 9 with DSLR, and as an outspoken advocate for RAW, I believe these discussions are about the wrong question.
I believe the appropriate question is: “which is the best file format for a given use or target system”, just as in “what is the best lens for a given shooting situation”.
However, where most photographers can agree on – say – a 85 mm. lens being more apt for portrait and a 24 mm. more apt for landscape, we seem to be unable to come to the same kind of agreement on RAW and JPG.
Moreover, and just to clear that one up, the choice for either format has absolutely nothing to do with being an amateur or professional (professional, as in: someone who gets paid to take photographs).
The large majority of professional press and social event photogs tend to shoot in JPG, because they generally produce large amounts of images directed at relatively low resolution end-systems like photo albums, newspaper print and the Internet.
In these types of workflows, the additional advantages of the RAW format are hardly relevant, while the additional processing demands of RAW may decide the difference between making and missing a deadline.
Advertising photographers, on the other hand, shoot mostly in RAW, and – at least in Europe and the US – invest in expensive medium format RAW systems, like Phase One, Hasselblad, Mamiya, etc..
Theirs is a workflow that produces limited amounts of images, targeted at high resolution and/or large format end-systems like glossy brochures, bill boards and posters, while also – inevitably – considering more or less extensive retouch.
In both cases, the choice of file format is not defined by dogmatic this-is-better-than-that thinking, but rather by the practical demands of work-flow and target systems; one being fast-paced, relatively cheap and low resolution and the other comparatively slow, expensive and high resolution.
JPG vs. RAW: take-out vs. a-la-carte
The fundamental difference between these two file formats stems from the different ways digital cameras record the captured information to memory, which – for clarity – I will call “interpreted” (JPG) and “uninterpreted” (RAW).
In the case of JPG, the camera interprets the information captured by the sensor according to camera settings (sharpening, color profile, contrast, WB, etc.) and writes a compressed 8-bits file to memory.
JPG's so-called “lossy” compression process also “dumps” more or less of the captured information, depending on the camera’s JPG format settings (fine, normal, basic). The more compression (basic) the larger the amount of captured data that is gone forever.
This is why JPG files, independent of the chosen compression, are always smaller (in Mb.) than RAW files.
The compression inherent to JPG is also the main reason why this file format is less apt for posterior processing and retouching, because every time a JPG is re-saved, the compression algorithm compresses the file again, thus eliminating more and more information until visible deterioration creeps in; sometimes after as few as two or three saves.
For comparison purposes, I’d say the JPG file format is like a photo print: you can convert it and process it, but, whatever you do, you can never recover all the data that was captured at shooting time, not even in the original camera file.
For the same reason, it is recommendable to keep a JPG camera original unprocessed and – if any retouch were necessary – save it first as TIFF or PSD, to avoid cumulative, compression related image deterioration.
Once retouching is finished, the modified TIFF file can be simply saved back to JPG as a second-generation file, with fairly insignificant quality loss.
RAW is a very different kind of beast: the camera does not interpret, process or dump anything.
All the raw sensor data is written straight to memory as-is at 12-bits or 14-bits per channel, together with a series of tags (shooting data) and a codec, which tell a RAW converter how to initially interpret the file content and translate this into a preview.
Thus, virtually all decisions taken at the time of capture can be undone, by simply instructing the RAW converter to interpret the available data differently during conversion or “demosaicing”.
As a result, at the time of pre-processing a RAW file we can correct optical defects (CA, vignetting, lens distortion, etc.) and change virtually all mayor shooting parameters, with the exception of focus, aperture, DoF and blown (overexposed) highlights.
Why and when JPG?
In my experience, a carefully exposed JPG file that comes out of an average DSLR today can easily compete with home scanned 135-format film, be that slide or negative.
As such, JPG is a serious quality file format, in spite of its limitations in comparison with RAW.
• 8-bits color.
• A typical JPG file has a dynamic range in the order of 8 EV (exposure value or diaphragm stops), compared to up to 12,5 EV for RAW (Nikon D700). For reference, the DR of print film is in the order of 11 EV, the DR of slide slightly less.
• JPG has very little exposure latitude in the highlights. RAW files can typically “pull back” up to 1 EV, which means being able to recover highlights that in a JPG file would be beyond saving.
• Exposure, white balance, color balance, color profile, saturation, brightness, contrast, sharpness, etc. are “fixed” at the set values at shooting time.
• Can be enlarged (with considerable quality loss) but not extrapolated to larger than native file sizes.
• Cannot be retouched without (some) quality loss
Especially in combination with last generation (Nikon) DSLR cameras, however, the JPG format also has a number of important advantages:
• In-camera image correction & manipulation: noise reduction, anti-CA, D-lighting, anti red-eye, filtering, etc.
• Does not demand (investment in) specialized software.
• Much “lighter” (in Mb.) than RAW or TIFF files, takes up considerably less space on memory cards, etc.
• Web ready.
• Print ready for RGB oriented printing, either at home or via a (web) print service.
This means that an out-of-camera sRGB JPG file is ready for immediate use, without user intervention (except resizing), for the most used every-day applications such as web-sharing and home printing.
This is why I recommend the JPG format for
• Starting out in DSLR. There are a million things to learn with one’s first (Digital) Single Lens Reflex camera. I’d encourage “newbies” to first learn to use the camera properly, to improve their skills, to try to learn as much as possible from others and to concentrate on making better and better pictures.
After that, and depending on the experiences, it may be time to “complicate life” with the additional investments and learning curve of RAW.
But then again, maybe not. At least by then it is possible to make a more “educated” decision.
Those who are concerned about loosing “keepers”, might want to shoot JPG Fine + RAW for archiving, but shouldn’t generally bother to run these RAW’s through the machine, just yet.
It is extremely important to focus on becoming a better photographer first, which is something that may take a while…
• Casual photography, snapshots
• Event photography under well controlled lighting circumstances. This includes wedding photography, for example, because post processing several hundreds (or a few thousand) RAW images on a regular basis is something that not even the most fanatic RAW shooter would happily do.
For the occasional wedding or event, I have come to combine JPG for general shooting with RAW for the most critical shots: difficult lighting, posed portraits, large groups, etc., although – alternatively – I shoot the latter also in RAW + JPG Fine; because you never know when you get “lucky”…
• For all applications that do not demand the extreme image quality necessary for archival, large prints, retouch, CMYK pre-press, stock photography, etc..
• For users who wish to reduce their post processing to an absolute minimum.
Per the above, the “best” – or better said – “most practical” camera color profile for JPG is sRGB, because users are not obliged to convert from Adobe RGB to sRGB for day-to-day applications.
An additional argument for choosing sRGB as the default color profile for JPG is that aRGB - sRGB conversion appears to be quite “lossy”.
Why and when RAW?
The RAW file format is primarily geared to professional workflows, directed at CMYK pre-press and other high-resolution and large size printing processes.
The best example for this is that many professional Stock agencies demand their photographers to deliver high resolution (300 dpi.) TIFF files, with a minimum native file size of 6 Mp. or larger.
A native 12-bits 10 Mp. RAW file weighs approximately 15 Mb., and converts into a roughly 30 Mb. 8-bits RGB TIFF, 60 Mb. 16-bits RGB TIFF or a 40 Mb. 8-bits CMYK TIFF file.
In comparison, the same 10 Mp. RAW file converted to 8-bits sRGB JPG with minimum compression/maximum quality, weighs in at less than 4 Mb., insufficient to meet the minimum quality demands for Stock and other professional uses.
As the JPG format can be compared to a photo print, the RAW format is comparable with a film negative (including it's need for a, virtual, darkroom and post processing), and its advantages and disadvantages – apart from quality – are directly related with its target applications and a photographer’s preferred workflow.
• Labor intensive: must be post processed to create a “usable” image file, be that a JPG, TIFF or PSD.
• Not very practical for the simultaneous processing of large amounts (several hundreds) of images. Batch processing is an option, but eliminates many of the advantages of the format.
• “Heavy” (in Mb.). RAW files are approximately 4 times larger than low-compression/high quality JPG files, while RAW files converted to 16-bits RGB TIFF are as much as 15 times larger.
• Demands investment in specialized processing, retouching software with a relatively steep learning curve.
• In-camera corrections – like anti-CA – do not apply, except when using specific (Nikon) software.
• Native 12 or 14 bits file format, converts to standard 16-bits TIFF or PSD.
• Apt for extensive retouch and manipulation.
• Can be converted to different file formats, resolutions and color profiles without any image degradation.
• Can be “extrapolated” to larger than native file sizes with very little quality loss, especially in comparison to enlarging.
• Almost all shooting parameters and camera settings at the time of capture can be modified, with the exception of focus point, aperture, depth of field and blown highlights. Depending on the used RAW converter these modifiable parameters include at least:
- Exposure compensation (+/- 2 EV or more)
- White balance
- Color balance, fine adjustment & tint
- Noise reduction
- Brightness, contrast
- Shadow/Highlight (open-up shadows, “pull-back” highlights)
- Chromatic Aberration correction
- Lens correction
Therefore, I recommended RAW for more advanced amateurs, assignment & stock photographers, those who dream of “Going Pro” or habitually make large, high resolution prints, and those who prefer or need a file format with superior image quality for archival purposes.
RAW is also the format of choice for photographers who wish to have a file format apt for extensive retouch, manipulation or for future re-processing geared to improved visualization and printing technologies, like the wide-gamut printing already available on select large format printers, such as the 10-color Epson 9900.
Lastly, RAW is recommendable in “complicated” shooting situations, like artificial light, low light, back-lit scenes, and in any other situation where there are serious risks that the camera might be too far “off” in the most fundamental shooting criteria: exposure, white balance, highlight control, color balance and contrast, among others.
Even though the RAW format initially demands extra work in the processing stage, there are several ways of saving these conversion settings to make eventual future conversions less time consuming, and/or to facilitate batch conversion.
The Nikon raw converters View and Capture (all versions) allow the user to save the modifications as tags back to the original RAW.
The original image data is not modified in any way during this process, while the original image settings are kept available, marked with an asterisk*.
Programs like Phase One Capture One and Adobe Camera RAW save file modifications either in a central data-base on the local system, or save them in the original RAW folder in separate, so-called XML “sidecar” files, which also allow to recall the settings of the last conversion for quick and easy re-conversion and/or batch processing.
For those RAW shooters aiming at maximum quality conversions, my suggestion would be to set their cameras to Adobe RGB (aRGB), convert their camera files to 16 bits TIFF or PSD and combining this in their software preferences with a color profile of considerably wider gamut than Adobe RGB, named ProPhoto RGB.
Since the aRGB camera setting is just a tag, it is practical to set it for “standard” wide-gamut conversion, as this does not complicate user intervention or system preferences.
Still, it does guarantee that RAW’s are always converted to a wider than sRGB color profile, independent of user intervention or used software.
If available on your system, ProPhoto RGB can be set in the color conversion settings of all Nikon programs, while Photopshop and Lightroom include it as part of their icc (icm) profile set, and offer it as a conversion option in ACR (Adobe Camera RAW).
Phase One Capture One, on the other hand, installs ProPhoto RGB as its default color profile since v.3.
If you do not have ProPhoto, you can download it here (Windows).
For those interested in knowing more about ProPhoto RGB, I suggest reading this clarifying article on Luminous Landscape.
Conclusion: Sometimes JPG, sometimes RAW, sometimes BOTH
My philosophy is that there is no such thing as capturing too much (be that colors or pixels); it is better to have it and throwing it away, than not having it and needing it.
Isn’t that why most of us were shooting slide in the film days?
The same goes for conversion: why not squeeze every last bit of “good” out of a file that has it readily available?
This is particularly true for images that need extensive retouch, where it may be a mayor pain in the buttocks to start from scratch.
On the other hand, although JPG – with its limited dynamic-, tonal range and gamut – does not cut it for hi-end reproduction systems, I can think of a million applications and situations (apart of the mentioned above) where it is more than enough.
My bet is that the large majority of users do not need better, just as it is my stance that a six-mega-pixel-plus DSLR is more than enough for most everyday shooting and still leaves room for more ambitious endeavors.
You may agree or disagree, but it is an uphill argument to claim that better cameras make better photographers.
I will always believe it is the other way around: the best photographers are those who make the most of their camera (whatever camera).
A big thanks to Carsten Saager for his contributions to this article.
Want to help?
If this article is useful to you, please consider a small contribution. Thank you!
Comment from: Andreas Wallner [Visitor]
Nice summary, though I one thing is missing: The fact that using a large gamut color space can degrade Image quality when using low color depth images. (E.g. using ProPhoto RGB with 8 bit Files). Using such a color space with low color depth images can result in pretty visible banding, just because the individual colors that can be displayed are too different.
Comment from: [Member]
Thanks for commenting. You’re making an interesting observation here, on something I never even considered.
Any thought on why anybody would want to convert low-bit narrow gamut images to hi-bit wide gamut?
I can’t think of any, but I would surely like to know your PoV.
Form is loading...