File size on the Canon 5D2

RAW file size

At its highest settings, the Canon EOS 5D Mark II produces 21 Mpixel RAW images. These are about 26 MByte according to the manual (page 55). This article will concentrate on RAW rather than on JPG.

File sizes versus sensor resolution for various Canon cameras

File sizes versus sensor resolution for various Canon cameras

The diagram compares the file sizes of various Canon digital SLR cameras. The solid red line is the 5D Mark II. At its highest resolution, it  produces 26 MByte files, but it also has 2 lower resolution sRAW modes (10 Mpixel and 5 Mpixel) which will be discussed later. 26 Mbyte files is slightly larger than the RAW files from the Canon 1Ds Mark III (also 21 MPixel), and significantly larger than images from Canon’s lower resolution models.

26 Mbytes for 21.1 Mpixel equals 10.3 bit/pixel. The sensor itself produces more data: 14 bit/pixel (remember that a camera pixel captures only one color per pixel – essentially a marketing decision to get you large numbers). The compression from 14 bit/pixel to 10 bit/pixel is in principle lossless – meaning that typical image files will shrink compared to the original data without any visible loss of quality (“lossless”). As usual for lossless encoding, some types of images will compress better than others. Some un-photolike images may even grow rather than shrink.

Information density of images generated by various Canon EOS camera

Information density of images generated by various Canon EOS camera

From the above data (based on the file sizes quoted in the Canon Instruction Manuals) we can conclude a few things:

  • A RAW file at the camera’s native resolution is roughly 10 bit per pixel, or about 1.25 MBytes per Mpixel.
  • JPEG files are (at their higher quality setting) about 2.5 bit per pixel, or 4× smaller than RAW. You can opt to make them 8× smaller instead of 4× smaller by using a lower quality setting (not shown) although most photographers will prefer the highest quality JPGs these cameras can produce.
  • The per-pixel quality of JPEG files seems to shrink with increasing resolution. Maybe simply because there is less difference between adjacent pixel readings in a high-res image (due to the subject, or due to lens limitations).
  • The size of RAW files (at the camera’s native resolution) actually increased in terms of bit/pixel (or MByte/MPixel). The camera models 10D → 30D → 40D → 450D → 5D2 show an increase in bit/pixel which goes 7.5 → 8.9 → 10.4 → 10.7 → 10.4.  All-in-all, more than a 35% increase, which can be partly explained by the transition from 12-bit to 14-bit pixel accuracy. So it might also be an increasing emphasis on quality. JPEG files, in contrast, are said to be limited to 8-bit values due to the JPEG standard.
  • The new lower resolution sRAW files require more storage per (Mega)pixel than the full RAW files. This is because they have use a very different internal technology despite the use of the same .CR2 file extension. Thus, the sRAW 2 format is more than half the size of the full resolution RAW while having 4× fewer pixels.

Storing 26 Mbyte images

26 MByte images can become a problem for processing (get a faster CPU with more RAM), storage (get a larger hard disk) and communications (get a faster network).

The storage part is easiest to solve: 1 TByte drives cost below €100 and hold 40 thousand 25 MB images. Large drives are often faster than smaller ones (more bit per track). I already took measures to prepare for the storage part: dual Samsung SpinPoint F HD103UJ 1Tb in a NAS.

Moving 26 Mbyte images

Ideally faster communication involves using local drives rather than network drives, or using a gigabit LAN to central storage (my choice). The LAN still doesn’t achieve 1 Gbit/s speeds, but say at 200 Mbit/s it still takes 1 seconds to download each image. Avoid wireless links as they are 10× slower. At 200 Mbit/s, the CPU rather than the LAN may be the bottleneck. A drive attached to USB 2.0 or Firewire will also give you about 200 Mbit/s.

Processing 26 Mbyte images

Processing is the tricky part: Lightroom and Aperture (Mac) show you the modifications you make but using lower resolution previews of images. In fact, they do not generate high-resolution images of any image files at all:  they just record what modifications you did, and repeat these when needed. They rely on lower-resolution “cached” images generated once in a while from the full resolution images. In Lightroom you can see this happening: when the full resolution image is fetched it display “Loading” or “Loading preview”. In contrast, typical image processing in Photoshop or intermediate processing in DxO Optics Pro involve reading and writing of full-size images.

There is obviously a lot to say about performance differences between different computers. For modern image processing software, having multiple cores helps. Having enough RAM (cheap nowadays) always helps. I am currently using a 1.8 GHz dual core Intel system with 2 GBytes of RAM.

The sRAW option

Photographers who feel that 10 or less Mpixel gives enough image quality have the option of creating and storing in “sRAW 1” (10 Mpixel -> 15 MB). This sRAW option is newish and not supported by some software that does support regular RAW. Photoshop Lightroom and Canon’s own software support sRAW. DxO and Aperture currently do not support sRAW. Photomatix Pro (HDR software) plans to support sRAW soon.

Although sRAW files have the same .CR2 file extension as traditional Canon RAW, they are technically very different. Analysis by Gao YangDave Coffin and Laurent Clevy has shown that sRAW does not store the original Bayer RGB matrix, but instead contains a 15-bit luminosity value per each pixel location, and 2 or 4 color components per block of 2×2 pixels (in the reduced resolution).

sRAW 1 (half the pixels) is suitable for many applications (e.g. portraits), but the limited third-party software support can be a problem. It is also not known yet how sRAW 1 compares in quality to a hypothetical RAW file from a camera with the same resolution. sRAW 1 files from the Canon 5D Mark II are on average 15 MBytes (12 bit/pixel) – meaning that you get a 1.7× reduction in file size in exchange for a 2× fewer pixels. The 2× pixel reduction should give 2× faster processing in programs like Photoshop because these internally use their own data formats.

This entry was posted in Photo Technology and tagged , , , , . Bookmark the permalink.

11 Responses to File size on the Canon 5D2

  1. steve says:

    Hi Peter
    Thanks for doing the homework there, well done. I’m about to buy one of these beasts and it really is a factor the ol’ file size… at a wedding I have been known to really go for it and hit the 2000 mark… I was wondering if you reckon you could get a good A3 from the medium large jpeg size?
    Thanks
    Steve

    • pvdhamer says:

      Despite popular belief, MegaPixels are not all they are cranked up to be be: I used two L-series lenses on a 6 MPixel Canon 10D until I bought “the beast”. Even cropped 6 MPixel work out fine at A3 on a high-quality printer (B9180). Maybe partly because (well-)interpolated pixels tend to be higher quality than original (de-mosaiced) pixels in the first place.

      So I wouldn’t worry about using 10 MPixel rather than 21 MPixel unless you are doing studio work, using a tripod, or may have an award-winning photo opportunity. I can see if I can add a posting showing the impact of sRAW1 on picture quality one of these weeks.

      The one to possibly worry about, however, is whether you want to shoot JPG (as you stated) or RAW. That one is even more painful as that gives a 5x size difference rather than a <2x size difference. That obviously impacts your workflow much more.

      Remember that not all post-processing software supports sRAW1 format. Good luck.

      Peter

    • pvdhamer says:

      Alternative answer (but same advice): the 5D Mark II’s 10 MPixel scaled down photos are likely to have better image quality than the 5D Classic’s 12 MPixel photos.

      This because the 5D never really had 12 million R/G/B values to start off with. And the 5D Mark II generates it 10 MPixel image using the full resolution image. So “has 10 MPixel resolution” and “has 12 MPixel resolution” statements are both correct-ish, but use a different definition of MPixel 😉

  2. Steve says:

    Thanks Peter, had to read that one three times there till it sank in. I just use RAW s for special occaisions, usually when its a big, critical or tricky shot. Otherwise I am one of the renegades that is quite happy with JPEGS. I have often shot the Raw + Jpeg together, cant see much advantage of the RAW most of the time to a proplerly shot JPEG.
    From what you say it sounds all good; bigger is better even at a large inbetweenie JPEG size cos I wont be makin too many big posters from the wedding game…
    I hear the high speed UDMA cf cards are the business for this camera, especially for the video bit. Was wonderin do you need a special reader to download a UDMA card?
    Keep up the good work, there is gonna be a lot of heads tryin to figure out how to tame this beast.
    Cheers
    Steve

    • pvdhamer says:

      Thanks. See http://peter.vdhamer.com/2009/01/19/canon-5d2-and-compact-flash/ for the answer to “I head high-speed UDMA cards are needed”. Answer: not really.

      Regarding “special card reader needed”. No – any somewhat recent card reader will work. Maybe if you really care, you could get a Firewire card reader rather than USB 2 (to increase readout speed).

      If possible, put any card-related Responses next to the card-related posting. More chance that others can benefit.

      Peter

  3. I just wanted to add that the file size for the .cr2 are not constant, but depend directly on the noise level of the image, either from iso noise or from image content and exposure level. I have seen cr2 files ranging from 20MB to 34MB. so 26MB is a good middle average, but one shouldn’t rely on it.

    • pvdhamer says:

      You are right, thanks. Variable file size obviously also applies to JPG files. For lossless compression (CR2 is a compressed and lossless or near-lossless format) you can actually proove that the compressed file size depends on the image content.

      Peter

  4. Pingback: NAS and Lightroom performance « Peter.vdHamer.com

  5. Pingback: iPad Camera Connectivy Kit « Peter.vdHamer.com

  6. My RAW file sizes tend to be even larger – in the hi 20’s to mid 30 MB. This is because I tend to shoot a ‘correct’ exposure of 1/3-1/2 stop higher than indicated by my 5DII’s meter.

    Jon

  7. Pingback: Fuji’s Organic Sensor Technology | Peter.vdHamer.com

Leave a Reply

Your email address will not be published. Required fields are marked *