02-25-2020 12:58 PM
It seems that the software provided by Canon is NOT as complete as it could be when dealing with metadata. Therefore, I've been using a number of tools that rely on a program called ExifTool for accessing/viewing metadata associated with image files related to my photographs. The specifications (per user manual) for my camera includes a line as follows:
I have my camera set to produce raw files thinking that this produces files that contain more precision than the 8 bit limit associated with the JPEG specification and allows more latitude for the software used to develop the photos. However, the metadata associated with these raw files include an element within the group identified as EXIF:IFD0 which contains a tag named BitsPerSample with a value of "8 8 8". To be sure metadata is a complicated subject easy to misunderstand but it is my understanding the IFD0 refers to what is called the main image. As it happens these same raw files also include an element within the group identified as EXIF:IFD2 which contains a tag named BitsPerSample with a value of "16 16 16". I'm having some trouble determining the specific purpose of the EXIF:IFD2 group but based on what appear to be related values of "668" and "432" for ImageWidth and ImageHeight, respectively, I'm thinking this could pertain to a thumbnail. It would make some sense to me if the thumbnail where limited to 8 bits per sample even when the main image was 16 bits per sample. However, I can make no sense out of what's presently there.
It would be nice if Canon had some reference documentation, for those who might be interested, that elaborates on the meaning of all the metadata that their cameras record in the produced image files. Is that possible?
Anyway, can someone explain how to interpret these various elements called "BitsPerSample" that get recorded in Canon's raw files. Filetype is CR2 if that matters.
Solved! Go to Solution.
02-28-2020 10:37 AM
"Problem here is that you can NOT record 14bits of color depth with 8bits."
The high bit depth of the Raw image is converted into 8-bits per channel in the jpg, so don't convert to a jpg. Remember, all images start out as Raw, it's just what happens to it after the capture that is important.
02-25-2020 01:34 PM
I believe that all RAW files are ultimately proprietary and that's it's going to a tall order to get any documentation from any vendor on the actual file format.
Yes, Adobe effectively figures things out for ACR (Adobe Camera RAW), but still, that's going to involve some serious deep data dives.
Is there a specific reason you need to understand the actual structure/data of Canon RAW? e.g. are you attempting to write your own software for some specific purpose?
02-26-2020 12:06 PM - edited 02-26-2020 12:10 PM
The particular interest in BitsPerSample came about because my work flow ends up producing developed images in lots of different formats. This includes both tiff and png which each support both 8 (some would say 24) bit & 16 (48) bit formats. In this case the 8 & 16 refer to the maximum resolution that the format is capable of accomodating. I'm trying to find a metadata tag that I can display in list of image files that serves the purpose of quickly and ?accurately informing about those differences in format. Since I found mutliple different tags with values for BitsPerSample in some files an obvious question becomes "what's the difference?". I think the tag referenced as EXIF:IFD0:BitsPerSample looks to be doing the job. However, I did NOT expect a value of [8 8 8] for my raw files for the reasons previously stated. In that, raw is supposed to provide more color depth than what can be encoded in 8bits. My camera specs imply it can capture up to 14 bits.
That brings us to the difference between what the camera sensor is capable of detecting (14bits?) and what the file format is capable of supporting (8bits). In that, if it had said 16bits I'd have taken that to mean the file format rather than sensor capability. Problem here is that you can NOT record 14bits of color depth with 8bits. When I discovered another IFD2:BitsPerSample that showed as [16 16 16] this became particularly puzzling.
Also, went and found some images where I had the camera record both raw & jpg. It turns out the there is NO IFD0:BitsPerSample tag at all even though that should be the case where [8 8 8] might be correct. Also puzzling.
Insofar as the camera is creating this data one might think that Canon could tell its' customers what it means.
02-25-2020 01:53 PM
02-25-2020 01:59 PM
Interesting that the web site claims that information is licensed under creative commons. I don't think Canon would have licensed out their format to being with 🙂 Thus, this appears to be work of reverse engineering which are usually called out to be forbidden in license agreements.
02-26-2020 12:16 PM
02-26-2020 01:52 PM
Of course, RAWS don't have "color depth" since the raw data is strictly monochrome, so it would make no sense to have 3 8-bit channels.
02-28-2020 10:18 AM
Raw files contain one red, green, or blue value at each pixel location. A Raw file contains all the info to make a color picture. The big difference is whether you let the camera make the conversion or you let the computer do the conversion. Almost all in-camera settings that affect image adjustments are irrelevant when shooting In Raw format. That is why a B&W Raw photo shows up as a color picture in some converters for instance. They don't read the B&W flag set in the meta data by the camera. So they display the color read from each red, green, or blue pixel location.
02-28-2020 10:23 AM
"It would be nice if Canon had some reference documentation, ..."
That ain't gonna happen. Don't you think Adobe would love that?
02-28-2020 10:37 AM
"Problem here is that you can NOT record 14bits of color depth with 8bits."
The high bit depth of the Raw image is converted into 8-bits per channel in the jpg, so don't convert to a jpg. Remember, all images start out as Raw, it's just what happens to it after the capture that is important.
09/26/2023: New firmware updates are available.
CN-E45-135mm T 2.4 L F - Version 1.4.0
EOS 1DX Mark III - Version 1.8.0
EOS R6 Mark II - Version 1.2.0
08/18/2023: Canon EOS R5 C training series is released.
07/31/2023: New firmware updates are available.
05/31/2023: New firmware updates are available.
05/18/2023: New firmware updates are available.
EOS Rebel T100 - Version 1.1.0
EOS 5D Mark IV - Version 1.4.0
PowerShot Elph 360HS - Version 1.1.0.0
PowerShot SX420 IS - Version 1.1.0.0
PowerShot 620 HS - Version 1.1.0.0
PowerShot SX720 HS - Version 1.1.0.0
PowerShot G1X Mark III - Version 1.1.0.0
PowerShot G7X Mark II - Version 1.2.0.0
PowerShot G9X Mark II - Version 1.1.0.0
03/30/2023: New firmware updates are available.
Speedlite EL-1 - Version 1.0.2
03/30/2023: Product Advisory for EF50 F1.2 L USM
03/30/2023: Product Advisory for EOS R10
Canon U.S.A Inc. All Rights Reserved. Reproduction in whole or part without permission is prohibited.