JPEG vs RAW

From Antalya
Revision as of 22:45, 18 December 2021 by Kgf (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Religious wars about picture formats

Should your camera store images in RAW or in JPEG, will you gain or lose with either?

Just the basics

  • Images are stored by encoding their red, green and blue components for each pixel.
  • These color values can be stored with different resolution. Typical values are between 8 bit per color (more than 16'000'000 colors) or 16 bit per color (more than 256'000'000'000'000 colors). Both of these are more than the human eye can distinguish. Take a look at the following optical illusion (from Wikipedia)
Illusion.png
In case you are wondering the central bar is the exact same grey tone, but your brain will be fooled into thinking that just like the background there is a gradient. Bottom line, humans are not very good at distinguishing colors or color tones. In fact scientific studies suggest that humans can reliably detect less than 100 grey tones.
  • Image sensors do not see colors, they are just sensitive to light. In your camera small filters are placed above each pixel that alternate between red, green and blue, so each pixel actually sees the intensity of one color
  • Some processing is required to mix these together so that every pixel has its own red, green and blue value.
  • Cameras could also make corrections to known imperfections of the lenses attached, add a color tone (that determines how the mapping will be done) and various additional processing.
  • The discussion is about how the image should be stored in the camera RAW (which is as captured by the image sensor), or JPEG, processed and with some amount of lossy compression to reduce file size.
JPEG: compressed and standard

Jpeg full.jpg

  • JPEG is a standard image format, practically every digital device will know how to read and display it.
  • JPEG reduces the file size through compression. This image (in its original size was 5'623'118 bytes, more than 6 times smaller than the corresponding RAW image. It is not only the amount of disk space, but the time it takes to read/write and transfer the images that will also take longer.
  • Standard JPEG will use 8 bits per color (there are other options for 12/16 bits, but they are not common).
  • Cameras that store JPEG give you ready to use images and include basic corrections.
RAW: unfiltered for post-processing

Raw full.jpg

  • There is no RAW image standard. Every camera has its own RAW format. Image processing programs have plugins for every camera to be able to recognize the format. At eats my web browser, by default did not have the ability to display RAW images. So I converted the RAW image to JPEG so that I could show the picture.
  • RAW images are large. In this case the image was 35'225'291 bytes.
  • RAW images can (and usually will) have more color depth, meaning color will be encoded with more than 8 bits. We say that the image will have larger dynamic range.
  • RAW is excellent for people that want to post process all their images. If you start doing so, you are also not limited by the capabilities of the camera, you can use the full range of image processing capabilities of modern computers

Final Words

  • Personally, I always use JPEG. However I also rarely post-process my pictures or only do so to correct glaring mistakes
  • Contrary to popular belief, JPEG images can also be post-processed just like RAW images. However, with RAW images you start at the source, without any corrections, losses for compression.
  • There is nothing wrong with RAW, but I do not see much benefit in it.



These pages are for Amateur Photographers and not really for seasoned photographers and professionals. I have no affiliation or commercial interest with any brand/make. I write from my own experience. I ended up using mainly Nikon, so I am more familiar with this brand than others. See price for notes on pricing as well as photography related links.