I was browsing the forum and found this thread:

Does the selection of sRGB or Adobe RGB in camera when shooting RAW ever matter?

It makes sense that the selection of either sRGB or Adobe RGB as the colorspace is only relevant when converting from RAW to JPEG, but that does mean RAW file formats use some other convention to represent color information, maybe even a proprietary one.

Does anyone know which convention would that be? And how to map it to sRGB, Adobe RGB and/or any other colorspace?


1 Answer 1


It's just the values from the sensor, which is a (mostly) linear counter. The different photosites on a Bayer sensor have different colored filters, and the value for each site represents the light which gets through that filter. The name "RAW" is meant to convey precisely that the values are simply that "uncooked" reading.

In a sense, then, the RAW file is in the camera's native colorspace, where the primaries match whatever happens to be the wavelengths of the filter. Converting to a reference color space like sRGB or Adobe RGB is a matter of transforming from the native space to that, and to do it correctly you need to know the particular properties of the filters in a given camera's sensor.

Raw converters use a color matrix (specific for each camera model) to get their results. You can see this in the dcraw source code — it's my understanding that author Dave Coffin gets most of this information from Adobe, who in turn has relationships directly with the camera manufacturers.

  • \$\begingroup\$ In dcraw he has a "hidden" function to calibrate a new camera model from the McBeth colourchecker, where he hardcoded the x.y positions of each colour, so the image must be resized to match. So if your camera is unsupported you can extract the numbers yourself. I guess he also uses that to extract the matrix? \$\endgroup\$ Commented Jan 31, 2013 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.