JPEG or RAW?

One of the most commonly asked questions when starting out is what quality setting should I use, or more specifically, should I use RAW or JPEG file format?

Like a lot of things, there is no easy answer. It is a choice based purely on the work flow you wish to use to get the desired amount of control over your image files.

First up some basics.

All images taken by all cameras, phones etc are RAW data to start with. RAW data is just that, data not an image. 

All useable images for printing, viewing and sharing are JPEG files (or similar), so the end product is the same (just the journey is different).

Choosing RAW format means you do not want the RAW conversion to be done by the camera, (usually pre-shot), but want to do it yourself using a relevant RAW conversion programme.

Why?

JPEG files use the camera's pre-set settings to create the image*. JPEG files can be effectively anything you want within the limits of the settings available in your camera, but once taken, the JPEG becomes "fixed" and far less flexible for post processing. All unused data is discarded (literally dumped) to save space. RAW files can be up to 4 times the size of processed JPEG files. 

*sharpening, colour saturation, tone, contrast, white balance, exposure and any special effects applied. None of these are applied in a RAW image with the assumption you will process to your needs. When you look at a RAW image on the camera screen or during processing, you are looking at a JPEG created for viewing called a thumb nail or preview image, not a full sized image.

The one on the camera back will also look like the camera's JPEG settings have been applied, while the one you upload into your RAW processing programme will often look flat and unexciting as it does not have any of the JPEG settings applied to it. It is a blank canvas waiting for you to process or to put it another way, it is an unbaked cake.

 Lets pretend your RAW file looks like this (in reality the "jelly beans" would be mostly green with a few blue and red making up the sensor's Bayer array).

Lets pretend your RAW file looks like this (in reality the "jelly beans" would be mostly green with a few blue and red making up the sensor's Bayer array).

The JPEG is created from the RAW data to make a usable (or visual) file.

 After the JPEG is processed, all of the unused "jelly beans" around the outside would be dumped, leaving you with a much smaller file to process. What is left is complete, but lean and less flexible.

After the JPEG is processed, all of the unused "jelly beans" around the outside would be dumped, leaving you with a much smaller file to process. What is left is complete, but lean and less flexible.

If the image is what you want or is close enough that minor fixes can perfect it, then you do not need to process a RAW image file. Many brands brag about the quality of their JPEG files and rightfully so, as they are the effort of many years of development.

If however you want to push the file a bit further, manipulate it or recover lost highlight or shadow detail from poor exposure, the RAW file has a lot more room for processing (all of the unused jellybeans are on "standby").

Below is a file badly over exposed, but recovered reasonably well in RAW. A JPEG file would be less successful as the lost detail would be out of it's range to retrieve. 

In effect, you can only easily subtract from a JPEG, not add new data (without some serious photoshop work). For example you could successfully convert a colour JPEG into a black and white one (subtracting colour), but not the other way around.

Users of RAW will tell you that RAW processing is also gentler and more natural looking than the common JPEG file, but that is often in comparison to JPEG's straight out of the camera and is only noticeable at very high magnifications. The manufacturers put an enormous amount of effort and time into their JPEG processors on the assumption that many people will use them regularly or exclusively.

 This is a high magnification crop of a sharpened and noise reduced (and contrasty) JPEG file. At this magnification, the detail looks very processed and harsh. Not much could be done to fix this except to soften the effect (reduce sharpness), but the camera settings could have been set to avoid this happening in the first place. At normal size, this file actually looks snappier and richer than the un processed RAW file and printing it would smooth out the harshness.

This is a high magnification crop of a sharpened and noise reduced (and contrasty) JPEG file. At this magnification, the detail looks very processed and harsh. Not much could be done to fix this except to soften the effect (reduce sharpness), but the camera settings could have been set to avoid this happening in the first place. At normal size, this file actually looks snappier and richer than the un processed RAW file and printing it would smooth out the harshness.

 This is the unprocessed RAW file. From here gentler processing can be applied to the more natural looking file. Although it looks much smoother at this size, the original size is quite flat looking.

This is the unprocessed RAW file. From here gentler processing can be applied to the more natural looking file. Although it looks much smoother at this size, the original size is quite flat looking.

So, JPEG or RAW?

Still up to you, but here is a suggestion.

Use JPEG's anytime;                                                                                                                          

  • the images are safe to shoot as is (no difficult lighting, colour or dynamic range issues and you have had time to do test files if needed),
  • the images are to be done in bulk quantities and are not going to be manipulated,
  • you are using a special effect or look only available through the camera's JPEG settings,
  • it is only casual shooting,
  • you want an easy work flow (see below),
  • the file will not be enlarged to extreme sizes,
  • storage space is at a premium.

Use Raw if;

  • the files may need heavy manipulation to retrieve lost shadow or highlight data,
  • you intend to treat them like fine art images where the most complete control in processing is desired and big enlargements are desired,
  • you wish to explore the limits of the file creatively,
  • you may want to revisit the image now or later and develop it differently,
  • you do not know what you may need now or in the future (especially client images).

Use both if;

  • you have the space and are not sure which to use,
  • need a speedy turn around, but may need to fix errors on some files that JPEG's cannot handle,
  • would like a JPEG effect only the camera can provide, but would like the option of a clean file for later processing.

Work Flow

Once you have decided to use RAW or JPEG, your work flow can be established.

JPEG users will have the benefits of a file format that is not specialised RAW programme dependant and is smaller and "ready to go". Any device or computer can process and store the files and copies can be made as needed. For every 10 gb of storage you will be able to store 2-3,000 images and they are effectively future proof. This is why most low end devices and cameras are set to produce JPEG's only, as the decision to use RAW is really a photographers choice, not a casual shooters one. 

Importing and sorting can be straight forward and posting to web sites etc a breeze. 

RAW users have a couple of extra steps to make.

The RAW file must at some point go into a RAW processing programme (you can see the RAW image on your screen, but that is a preview JPEG only). The process could be as simple as importing to a programme using pre-set settings and exporting out as a useable file type (JPEG, TIFF etc) and some programmes give you the option of "batch" processing on import or after, but the point of using RAW is to be able to process images more precisely and to suit the intended purpose, so batch processing should only be seen as a starting point. The original RAW file should be left untouched for later processing*.

*This is very important. Some programmes such as Photoshop will process your RAW files permanently unless you first make a copy, while specialist RAW file processors like Lightroom, DXO, Capture 1, only ever processes a copy file, never touching the original so you can re-visit them as needed.

Storage is more problematic now as 10 gb only holds hundreds, not thousands of files and these are only accessible using a RAW processing programme. If you choose to shoot both RAW and JPEG, you get the best of both worlds, but your storage issues are greater and may require two steps.

Another long term issue is each RAW file type is specific to each model of camera (not brand). Eventually support of older models may drop away or the programme will only give passing support to them, although this has not happened yet. New models of camera can also suffer from lack of RAW support early in their life, leaving the user with JPEGs only for the first few months after release, unless you wish to chance the manufacturer's often clumsy and limited RAW processing programme supplied with the camera.

One solution is to convert and re-file your RAW images as DNG conversions. DNG or Digital Negative is a simple RAW storage file that Adobe created to help future proof RAW files. It's main down side is you need for an Adobe or Adobe sanctioned product to open them, but the base programme is deliberately very simple so in future it will be easily possible to resurrect it even if Adobe disappears.

Depth Of Field

What is Depth of Field?

When you focus on something when making an image, a certain amount of the image behind and in front of the point of focus is also sharp. This is called the zone of “Depth of Field” (DoF). It is important to remember that most DoF falls behind the point of focus, not in front of it. A common mistake when taking a landscape image is to focus on the back of the image, blurring the foreground. It is always better to focus forward and let the DoF do it's work for the background. 

DoF is made up of three parts;

The fully sharp or focussed area, also known as the plane of focus,

 The focus point is pretty clear in this image. 

The focus point is pretty clear in this image. 

The transition zone, where fully focussed sharpness starts to become less sharp or softer, depending on the distance to the subject, their background and the aperture chosen (most sharp and transitional DoF falls behind the point of focus),

 In this image, the transition is more evident and important. The point of best focus is the back of the man's Kimono, but more important to the image is the woman facing us, who is not fully in or out of focus, but in the  transition  between the two.  This use of transitional DoF is often referred to as "Bokeh" or the "character" of focus transition and blur and will vary by lens and circumstance.

In this image, the transition is more evident and important. The point of best focus is the back of the man's Kimono, but more important to the image is the woman facing us, who is not fully in or out of focus, but in the transition between the two. This use of transitional DoF is often referred to as "Bokeh" or the "character" of focus transition and blur and will vary by lens and circumstance.

The out of focus area, where all sharpness is lost, becoming true blur

 An image made up mostly of sharply focussed detail and soft blur with very little transition. Close-up images often transition very quickly as close focus distance DoF decreases dramatically (becomes shallower).

An image made up mostly of sharply focussed detail and soft blur with very little transition. Close-up images often transition very quickly as close focus distance DoF decreases dramatically (becomes shallower).

*

How strongly a subject stands out from their background (or not) is called subject separation.

 Although this image is not an obviously strong example of a subject "jumping out" against it's background, it still heavily relies on  subject separation  to work.

Although this image is not an obviously strong example of a subject "jumping out" against it's background, it still heavily relies on subject separation to work.

Good (strongly defined) separation is usually the result of shallow or very shallow DoF, but contrast and colour can also help to separate the subject from their surroundings.

 The 3D look of this image comes as much from shallow DoF as it does from the contrast of the well lit main subject to the darker background and surroundings.

The 3D look of this image comes as much from shallow DoF as it does from the contrast of the well lit main subject to the darker background and surroundings.

How much depth of field sharpness, subject separation, focus transition and blur is shown in an image, depends on a few elements that are (usually) under your control;

  1. The lens Aperture value you select. 
  2. The distance you are from your subject including “zooming in or out” with the lens. Increasing magnification either way reduces DoF and visa-versa.
  3. The distance your subject is from it’s background. Increasing the distance the subject is from their background increases DoF and visa-versa. 

1. Aperture Settings

Lens aperture settings are the most important, direct and practical DoF control.

Aperture settings come in full value settings of f1.4, 1.8, 2, 2.8, 4, 5.6, 8, 11, 16, 22, 32, each one halving DOF (as you use smaller numerical values) and double the amount of light let through to the sensor (they are part of the exposure control triangle of Shutter Speed, ISO and Aperture).  Thanks to modern electrical camera controls, there are also 1/2 or 1/3 settings available between these full settings, but it is generally best to just think in full value settings at this stage.

Below is an example of some of these settings in action.

(If you use a zoom lens you will probably not have these first two apertures available)

                                                                         f 1.8                                                                                

 The focus point is the face of the first statue and that is basically all that is sharp. The rest of the image is pleasingly smooth and soft, making the front statue the clear "focus point" of the image. This is true  portrait  style technique emphasising maximum  subject separation .

The focus point is the face of the first statue and that is basically all that is sharp. The rest of the image is pleasingly smooth and soft, making the front statue the clear "focus point" of the image. This is true portrait style technique emphasising maximum subject separation.

f 2.8       

 The first statue is still the obvious focus point and is now fully in focus, but the other statues are starting to be become more coherent. This aperture is starting to "tell a story" by including more background detail (reducing separation and increasing transition), but this is still a shallow DoF  portrait  style image.

The first statue is still the obvious focus point and is now fully in focus, but the other statues are starting to be become more coherent. This aperture is starting to "tell a story" by including more background detail (reducing separation and increasing transition), but this is still a shallow DoF portrait style image.

(All lenses will have the following settings)        

f 5.6

 The image is now starting to tell a story now, showing all of it's elements, even if they are not all completely sharp. This is probably the least effective aperture value for this type of photo as it neither separates one element (a  portrait  style photo), nor shows all of them in sharp focus (a  landscape  style photo). The  transition  from sharp to soft is important here.                                     If you have a zoom lens and cannot use a wider aperture than this, there are other techniques you can use to make the DoF shallower (see below).

The image is now starting to tell a story now, showing all of it's elements, even if they are not all completely sharp. This is probably the least effective aperture value for this type of photo as it neither separates one element (a portrait style photo), nor shows all of them in sharp focus (a landscape style photo). The transition from sharp to soft is important here.                                    If you have a zoom lens and cannot use a wider aperture than this, there are other techniques you can use to make the DoF shallower (see below).

f 11           

 Almost all of the statues are now reasonably sharp. The image is starting to become a true  landscape  style image. Even though the village in the background is not fully sharp, the viewer will now accept it as part of the overall image.

Almost all of the statues are now reasonably sharp. The image is starting to become a true landscape style image. Even though the village in the background is not fully sharp, the viewer will now accept it as part of the overall image.

f 22

 Now even the little town in the background is starting to look in focus. These photos were taken of small (5cm tall) statues  up close , exaggerating the effect of shallow DoF.                                This image is using true  landscape  technique although the very close focussing distance (see below) has not allowed all of the elements to be fully sharp. Now scroll back up to the top, looking at the village in the background as you go.

Now even the little town in the background is starting to look in focus. These photos were taken of small (5cm tall) statues up close, exaggerating the effect of shallow DoF.                               This image is using true landscape technique although the very close focussing distance (see below) has not allowed all of the elements to be fully sharp. Now scroll back up to the top, looking at the village in the background as you go.

Most depth of field falls behind the point of focus, so if the foreground does not look very sharp until apertures f5.6 or smaller, that is normal.

Looking at the images, you will see a clear pattern emerging. 

When you use a wide aperture (small number value), the depth of field will be very shallow. At f1.8 it will look razor thin, making accurate focussing difficult, but important, especially at very close focussing distances. 

As the aperture values become smaller (bigger numbers), the depth of field increases or becomes “deeper”. The terminology is confusing I know, but it is what it is.

An easy way of remembering the aperture values and how they effect depth of field is to think of them as measurements of DoF distance or of the number of bottles that are in focus when focussing down a line of them. A bigger number is more DoF or more distance in focus (f2.8 is 2.8 bottles sharp, f11 is 11 bottles etc). This actually has nothing to do with what the numbers mean, but it helps to remember which way they work.

*

2. Magnification Using Lenses or Changing Distance

If you increase magnification (get closer) by either increasing the strength of your lens or getting closer, you reduce DoF and the reverse is true. These two methods can help control DoF, but they will act differently in another way.

  • If you get physically closer to the subject, using the same lens focal length, your DoF will get shallower because you are increasing magnification by reducing distance and at the same time changing the relative distance between the subject and their background, increasing separation.  
  • If you zoom in using a longer lens, the DoF will look shallower and the image more compressed (flatter), but the distance from subject to it's background will not change. using a wide angle lens will decrease magnification and expand perspective, making DoF look deeper.
 For this image, a medium long lens (150mm full frame equivalent) and very wide (f1.8) aperture were used. The distance to the focus point was about 3 meters and there is about a meter between each row of poles. The actual sharp DoF is about 2-3cm and the transition is minimal. This image is  magnified  and  compressed  by both a close shooting distance and a longer than standard lens focal length.  It would be technically possible to create exactly the same DoF using a different focal length lens (as long as the magnification is kept the same by moving closer or further away), but the perspective and the relative distance to the background would change, making the poles look more or less "flattened".

For this image, a medium long lens (150mm full frame equivalent) and very wide (f1.8) aperture were used. The distance to the focus point was about 3 meters and there is about a meter between each row of poles. The actual sharp DoF is about 2-3cm and the transition is minimal. This image is magnified and compressed by both a close shooting distance and a longer than standard lens focal length. It would be technically possible to create exactly the same DoF using a different focal length lens (as long as the magnification is kept the same by moving closer or further away), but the perspective and the relative distance to the background would change, making the poles look more or less "flattened".

Controlling perspective is as important as controlling DoF. The expanded look wide angle lenses give to landscape images add to their majesty, while longer lens compression makes an image more intimate and natural looking, ideal for portrait images. 

 By contrast, this image used a wider lens, and a smaller f5.6 aperture from a similar distance. The wider lens decreased   the  magnification  and expanded  perspective , combined with the smaller aperture to increase DoF. These poles were actually closer together than the ones in the image above, but look further away. 

By contrast, this image used a wider lens, and a smaller f5.6 aperture from a similar distance. The wider lens decreased the magnification and expanded perspective, combined with the smaller aperture to increase DoF. These poles were actually closer together than the ones in the image above, but look further away. 

As you have probably already worked out, most photographic situations will be a compromise of the above.

 This image was taken with a slightly  wide focal length  lens, but at  close distance  and with a reasonably  wide f2.8 aperture . The overall effect is of fairly shallow DoF due mainly to the short focussing distance as the strongest element. In images such as this the quality of transition (Bokeh) becomes important. 

This image was taken with a slightly wide focal length lens, but at close distance and with a reasonably wide f2.8 aperture. The overall effect is of fairly shallow DoF due mainly to the short focussing distance as the strongest element. In images such as this the quality of transition (Bokeh) becomes important. 

In a nutshell;

  • For the most dramatic shallow DoF looks, use a wide (small number) aperture value and increase magnification by using a long lens and/or getting very close.   
  • For the strongest deep DoF effect, use wider angle lenses and small (large number) aperture values and don't get too close to the main subject.

Astro Photography

The rules we looked at above have a great effect on astronomical photography.

Because the stars are so far away, it is possible to use a very wide aperture setting and still get everything in focus. This is really handy because time is your enemy with astro images. The more time you give the image, the better the colour and depth in the image, but because of the earth's rotation, (depending on the lens used- the wider the better), you will have from 1 to 30 seconds before movement blur ruins the image, unless you are after deliberately blurred star-trails that is.

The only things to keep in mind is the extra DoF needed to include foreground or earth bound elements in the image and possible lens aberrations* that appear when the widest apertures are used.Wider lenses give you more time, because they "push" things further away.

*Lenses used at their very widest apertures tend to show softness in the corners and chromatic aberration (colour fringing) or coma (smears) which may be obvious in your images. The newest batch of lenses are highly corrected, but older lenses will often show these flaws to some extent.  

Close-up Photography

The opposite is true for close-up photography. When you get into the macro (technically this is images that are reproduced in "life size"* or smaller, DoF drops off severely in response to the strong magnification and very small relative distances used. At focussing distances of only a few cm, even f22 will only give you a few mm of DoF. There are a few trick you can use to increase DoF discussed in Tips and Tricks below. 

*Life size means reproducing the subject on the sensor the same size as they actually are, so a 1" camera sensor would cover 1" of actual subject from edge to edge).

Tips and Tricks

1. Something you can do to increase DoF is change the angle by "tilting" the lens/camera forward,  or downward (using vertical-portrait orientation helps) or sideways (along a fence line or wall) to match the angle of the focussing plane to the subject better. It is especially useful when you are placing a small subject in the foreground and still want the distant horizon sharp or you are photographing a group of objects on one plane such as a table top. Some photographers use "Tilt/Shift" lenses to allow them to change the focal plane without moving the camera.

 This image was taken with the same lens and at the same distance as the above images using f1.8 aperture, so it has both a wide aperture and close focussing distance severely reducing DoF.      By placing all of the statues on the  same focus plane  (i.e. directly flat on), even a wide aperture can get (most) of them in focus (but nothing in front or behind). Shooting length ways down a subject exaggerates shallow DoF effects, "tilting" to get closer to the same plane of focus reduces that effect.

This image was taken with the same lens and at the same distance as the above images using f1.8 aperture, so it has both a wide aperture and close focussing distance severely reducing DoF.      By placing all of the statues on the same focus plane (i.e. directly flat on), even a wide aperture can get (most) of them in focus (but nothing in front or behind). Shooting length ways down a subject exaggerates shallow DoF effects, "tilting" to get closer to the same plane of focus reduces that effect.

2. Another trick is to take multiple images at different focussing points and combine them in post processing. This is called “Focus Stacking”, but it only works if your subject and camera stay still. Some cameras have focus stacking as a feature, but remember absolute stillness and consistency are critical. Just like panoramic style images, the programme used can only "stitch" the images together if they all match in framing.

3. If your subject is closer to their background than you are to them, it will be hard to separate them from that background. If shallow DoF with a blurred background is what you are after, move the main subject further away from their background. The opposite is true also. Decreasing the distance between your subject and their background will give a stronger sense of connection between subject and background environment.

4. For maximum possible DoF you can work out the "Hyper-focal Distance" focussing point. This can be done by  using either the lens markings if there are any (increasingly rare) or there are Apps available. This will tell you the best distance to focus at each aperture to guarantee the most DoF for your lens focal length and camera format. 

5. If you are finding it hard to achieve good DoF and quality in poor light or when doing close ups, use a tripod and/or flash. These will allow you to use f11-32 in combination with low ISO settings without slower shutter speed blur. Macro is also a good time to apply the tilting method to shoot side on or above your subject.

Lens Abberations

If f16 or smaller are used, be aware that they will be limited in sharpness by “diffraction”. Diffraction occurs around the edge of any hole light passes through, bending light waves and degrading the quality of that light. As the aperture gets smaller and smaller, diffraction becomes dominant, until eventually most of the light is degraded (diffracted). Extremely good lenses are sometimes called "Diffraction limited" lenses , meaning the only optical flaw they have is the only one that cannot be avoided.

When a “fast” or very wide aperture lens is at it’s widest settings, there may be some form of image flaw visible such as chromatic aberration (colour fringing- often green or purple and most obvious in high contrast images) or corner softness. Only the very best lenses avoid these issues (see "Diffraction limited" above). 

Bokeh

The transition from sharp to soft areas is sometimes called “Bokeh” (Bo as in bone - Ke as in kettle, the H is there to help with pronunciation) or more correctly Boke-Aji which is literally "the flavour or character of blur".

There is no such thing as good or bad Bokeh (although everyone has personal preferences). Every lens will render the out of focus and transitional areas of an image differently, some lenses even varying at different focal lengths and distances.

Some lenses have messy or busy Bokeh, some feathery or smeary, others smooth and blotchy (there are more "official" terms like Ni-Sen or cross-eyed Bokeh, but these more general terms get the point across). Some have more or less coherent blurred areas than others and transition smoother or less smoothly. Get to know your lenses Bokeh characteristics as they can be as important as sharpness when used often. 

  The Bokeh in this image is smooth enough to be smooth and un-distracting. This allows the photo to be made up is mostly out of out of focus elements, adding creative options. Using another lens may change the character of the image for better or for worse. The nose of the pony is a little "nervous" or busy looking compared to other lens renderings, but is pleasant enough.

 The Bokeh in this image is smooth enough to be smooth and un-distracting. This allows the photo to be made up is mostly out of out of focus elements, adding creative options. Using another lens may change the character of the image for better or for worse. The nose of the pony is a little "nervous" or busy looking compared to other lens renderings, but is pleasant enough.

 Taken on the same day, with the same lens, this image relies heavily on the quality of it's Bokeh. If the Bokeh was too messy looking it would distract from the point of the image and make the sharp area of focus less clear and important in image. Again this is slightly "nervous" looking Bokeh, but the long focal length and shallow DoF has separated the focussing point clearly.

Taken on the same day, with the same lens, this image relies heavily on the quality of it's Bokeh. If the Bokeh was too messy looking it would distract from the point of the image and make the sharp area of focus less clear and important in image. Again this is slightly "nervous" looking Bokeh, but the long focal length and shallow DoF has separated the focussing point clearly.

 Another example of Bokeh being a deliberately important element in a shallow DoF image. Poor Bokeh can effect the strength of an image. The only way to really know is to try out your lenses and compare their effects. If it feels/looks right, then go with it.

Another example of Bokeh being a deliberately important element in a shallow DoF image. Poor Bokeh can effect the strength of an image. The only way to really know is to try out your lenses and compare their effects. If it feels/looks right, then go with it.

 Sometimes, less soft or blurry Bokeh is desired. The lens that took this image as focussed (by mistake) at 2 meters and f2 aperture was selected (you can see the point of best focus is the first poster). The Bokeh characteristic of the lens was a more old fashioned "long transition" or coherent Bokeh, not as popular as the smooth and fast drop-of of most modern lenses, but very useful when the focus misses or DoF is limited. The people in the background are still clearly formed even though they are well out of focus and the transition is almost invisible. Other lenses in the same situation may tend to make anything past the point of focus quickly look blobby or smeared and make this image pointless.

Sometimes, less soft or blurry Bokeh is desired. The lens that took this image as focussed (by mistake) at 2 meters and f2 aperture was selected (you can see the point of best focus is the first poster). The Bokeh characteristic of the lens was a more old fashioned "long transition" or coherent Bokeh, not as popular as the smooth and fast drop-of of most modern lenses, but very useful when the focus misses or DoF is limited. The people in the background are still clearly formed even though they are well out of focus and the transition is almost invisible. Other lenses in the same situation may tend to make anything past the point of focus quickly look blobby or smeared and make this image pointless.