Color space?

The difference is that raw files are scene-referred and jpeg files are output-referred.
To help those who are barely aware of color management and read that as inscrutable jargon, it might be helpful if you explain what those two terms mean and why understanding the difference is important.
When software works with JPEG (or HEIF etc.), it decodes the RGB values for each pixel, and those values refer to the output device (monitor, TV, printer).

In the raw files, the data refers to the light captured from the real scene.
To me this "referred" business is still jargon and still hard to make sense of. It seems arbitrary.

You say that the decoded RGB values in a jpeg are "referred" or "refer" (two different voices) to the output device whereas the raw data "refers" to the light captured from the real scene. But the data in the jpeg also "refers" to the light captured from the real scene. That's why it looks like, for example, the cat. And the raw data, when viewed in a raw viewer, also "refers" to the monitor.
That doesn't mean there's no concept of colours in raw - but raw viewers need to perform more transformations before renderable RGB values are produced, and those transformations aren't standardised. So the exact default 'look' of raw images (before any editing) is not well defined.
More inscrutable stuff. If "the exact default look ... is not well defined" doesn't that mean that raw files, prior to interpretation, don't look like anything in particular and don't have any particular colors?
At the same time the above makes raw files highly 'malleable'.
So much for the light from the real scene! But the malleability if the raw does seem to be its main selling point. Of course, you can edit jpegs too. It's just that "information" is said to be lost, and "artifacts" are said to be introduced.
There's always a big loss of information when a raw file gets converted/exported into JPEG.
Is there a loss of information, as that term is used in plain English, or is there just a loss of data?
One can export a raw file into JPEG or other formats, but the reverse operation isn't possible without losses.
What about TIFF or DNG?
That's why it's best to shoot raw if there's a chance you export to other formats in the future (e.g. JPEG XL, HEIF etc. etc.)

.......

... and in fact it's more complicated even with RGB values from JPEGs. They're not used as is for output - that is, your monitor doesn't receive R,G,B values per pixel directly from a decoded JPEG file. More transformations are applied, for example, your operating system applies ICC profiles.
 
The difference is that raw files are scene-referred and jpeg files are output-referred.
To help those who are barely aware of color management and read that as inscrutable jargon, it might be helpful if you explain what those two terms mean and why understanding the difference is important.
When software works with JPEG (or HEIF etc.), it decodes the RGB values for each pixel, and those values refer to the output device (monitor, TV, printer).

In the raw files, the data refers to the light captured from the real scene.
To me this "referred" business is still jargon and still hard to make sense of. It seems arbitrary.
You have per-pixel numbers in R,G,G,B channels in raw and per-pixel R,G,B numbers in jpeg. What do those numbers represent?

In a raw file the numbers measure, roughly speaking, incoming photons from the scene. So it's a digitally encoded representation of a real scene (technically, the scene light + lens + Bayer filter + noise).

In a jpeg file the numbers represent the brightness of pixels on a monitor.
You say that the decoded RGB values in a jpeg are "referred" or "refer" (two different voices) to the output device whereas the raw data "refers" to the light captured from the real scene. But the data in the jpeg also "refers" to the light captured from the real scene. That's why it looks like, for example, the cat. And the raw data, when viewed in a raw viewer, also "refers" to the monitor.
Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg.
That doesn't mean there's no concept of colours in raw - but raw viewers need to perform more transformations before renderable RGB values are produced, and those transformations aren't standardised. So the exact default 'look' of raw images (before any editing) is not well defined.
More inscrutable stuff. If "the exact default look ... is not well defined" doesn't that mean that raw files, prior to interpretation, don't look like anything in particular and don't have any particular colors?
Neither raws nor jpegs have any particular 'look' before they're rendered.

With raw formats, we can define the default look as the look of OOC jpegs or jpegs embedded in raw files. That is, with demosaicking, white balance and picture style applied. But the exact processing is usually a trade secret only known to the camera manufacturers. Adobe attempts to simulate the out of camera look with their camera matching profiles in Lightroom.
At the same time the above makes raw files highly 'malleable'.
So much for the light from the real scene! But the malleability if the raw does seem to be its main selling point. Of course, you can edit jpegs too. It's just that "information" is said to be lost, and "artifacts" are said to be introduced.
There's always a big loss of information when a raw file gets converted/exported into JPEG.
Is there a loss of information, as that term is used in plain English, or is there just a loss of data?
It's a loss of visual information.
One can export a raw file into JPEG or other formats, but the reverse operation isn't possible without losses.
What about TIFF or DNG?
DNG is based on TIFF, and so do many raw formats - they're basically modified and extended TIFF.

You can do conversions between raw and DNG and TIFF with minimal losses. However, when you convert to the standard TIFF, you're applying demosaicking and white balance and you're effectively making it "output-referred". You can't convert from TIFF back to a RAW format without some losses.
 
The difference is that raw files are scene-referred and jpeg files are output-referred.
To help those who are barely aware of color management and read that as inscrutable jargon, it might be helpful if you explain what those two terms mean and why understanding the difference is important.
When software works with JPEG (or HEIF etc.), it decodes the RGB values for each pixel, and those values refer to the output device (monitor, TV, printer).

In the raw files, the data refers to the light captured from the real scene.
To me this "referred" business is still jargon and still hard to make sense of. It seems arbitrary.
You have per-pixel numbers in R,G,G,B channels in raw and per-pixel R,G,B numbers in jpeg. What do those numbers represent?

In a raw file the numbers measure, roughly speaking, incoming photons from the scene. So it's a digitally encoded representation of a real scene (technically, the scene light + lens + Bayer filter + noise).

In a jpeg file the numbers represent the brightness of pixels on a monitor.
You say that the decoded RGB values in a jpeg are "referred" or "refer" (two different voices) to the output device whereas the raw data "refers" to the light captured from the real scene. But the data in the jpeg also "refers" to the light captured from the real scene. That's why it looks like, for example, the cat. And the raw data, when viewed in a raw viewer, also "refers" to the monitor.
Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg.
That doesn't mean there's no concept of colours in raw - but raw viewers need to perform more transformations before renderable RGB values are produced, and those transformations aren't standardised. So the exact default 'look' of raw images (before any editing) is not well defined.
More inscrutable stuff. If "the exact default look ... is not well defined" doesn't that mean that raw files, prior to interpretation, don't look like anything in particular and don't have any particular colors?
Neither raws nor jpegs have any particular 'look' before they're rendered.

With raw formats, we can define the default look as the look of OOC jpegs or jpegs embedded in raw files. That is, with demosaicking, white balance and picture style applied. But the exact processing is usually a trade secret only known to the camera manufacturers. Adobe attempts to simulate the out of camera look with their camera matching profiles in Lightroom.
At the same time the above makes raw files highly 'malleable'.
So much for the light from the real scene! But the malleability if the raw does seem to be its main selling point. Of course, you can edit jpegs too. It's just that "information" is said to be lost, and "artifacts" are said to be introduced.
There's always a big loss of information when a raw file gets converted/exported into JPEG.
Is there a loss of information, as that term is used in plain English, or is there just a loss of data?
It's a loss of visual information.
One can export a raw file into JPEG or other formats, but the reverse operation isn't possible without losses.
What about TIFF or DNG?
DNG is based on TIFF, and so do many raw formats - they're basically modified and extended TIFF.

You can do conversions between raw and DNG and TIFF with minimal losses. However, when you convert to the standard TIFF, you're applying demosaicking and white balance and you're effectively making it "output-referred". You can't convert from TIFF back to a RAW format without some losses.
On one level I understand everything you say and I "know what you mean". On another level I still maintain, among other things, that the distinction you want to draw is arbitrary since the data in either raw files or jpegs can be "referred" to either the original scene or a display medium.

While I am at it, I must also question "Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg." Not spatially closer, I am sure. But more importantly, we don't have access to the "processing chain". We only have access to its outputs.

In the case of raw files this is a bunch of numbers that have an indirect relationship to some photons that were briefly available. Suitable processing can turn these numbers into something else, an image. The image may look surprisingly like what we think should have been there, especially after idealizing modification in a raw converter.
 
It will seem obvious to some, but all photographs are abstracted from reality.

we don’t need access to the algorithms or the computer code they are written in any more than painters need to raise their own flock of sables and farm trees to make brushes.

what we as photographers do need is to know how to use the tools we have available to make the photograph we want to create.

--
Ellis Vener
To see my work, please visit http://www.ellisvener.com
I am on Instagram @EllisVenerStudio
 
Last edited:
The difference is that raw files are scene-referred and jpeg files are output-referred.
To help those who are barely aware of color management and read that as inscrutable jargon, it might be helpful if you explain what those two terms mean and why understanding the difference is important.
When software works with JPEG (or HEIF etc.), it decodes the RGB values for each pixel, and those values refer to the output device (monitor, TV, printer).

In the raw files, the data refers to the light captured from the real scene.
To me this "referred" business is still jargon and still hard to make sense of. It seems arbitrary.
You have per-pixel numbers in R,G,G,B channels in raw and per-pixel R,G,B numbers in jpeg. What do those numbers represent?

In a raw file the numbers measure, roughly speaking, incoming photons from the scene. So it's a digitally encoded representation of a real scene (technically, the scene light + lens + Bayer filter + noise).
Exactly! Sensor pixels view the world through a mosaic of the colour filter array. Each pixel receives only a part of colour information and is missing 2 out 3 colour channels. This missing information needs to be reconstructed from neighbouring pixels using weights and biases informed by white balance and other JPEG engine settings.
In a jpeg file the numbers represent the brightness of pixels on a monitor.
and a colour of each pixel is defined, unlike that for a raw file.
You say that the decoded RGB values in a jpeg are "referred" or "refer" (two different voices) to the output device whereas the raw data "refers" to the light captured from the real scene. But the data in the jpeg also "refers" to the light captured from the real scene. That's why it looks like, for example, the cat. And the raw data, when viewed in a raw viewer, also "refers" to the monitor.
Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg.
Perhaps in terms of information content.
Neither raws nor jpegs have any particular 'look' before they're rendered.
Raw data doesn't have a look, it needs to be turned into a raster image through demosaicking first.
With raw formats, we can define the default look as the look of OOC jpegs or jpegs embedded in raw files.
It is a default processing, there is no look.
That is, with demosaicking, white balance and picture style applied. But the exact processing is usually a trade secret only known to the camera manufacturers. Adobe attempts to simulate the out of camera look with their camera matching profiles in Lightroom.
Exactly my point. The colour encoding in raw files does not define colours uniquely.
What about TIFF or DNG?
DNG is based on TIFF, and so do many raw formats - they're basically modified and extended TIFF.
They are all essentially a grid, a raster, but they contain different information. TIFF and DNG are raster images that contain colour information for each pixel. Raw files contain photon counts seen by individual pixels.
You can do conversions between raw and DNG and TIFF with minimal losses. However, when you convert to the standard TIFF, you're applying demosaicking and white balance and you're effectively making it "output-referred". You can't convert from TIFF back to a RAW format without some losses.
Agreed. So there is a difference between "processed colour information for each pixel" and "raw colour representation of the scene".
 
The difference is that raw files are scene-referred and jpeg files are output-referred.
To help those who are barely aware of color management and read that as inscrutable jargon, it might be helpful if you explain what those two terms mean and why understanding the difference is important.
When software works with JPEG (or HEIF etc.), it decodes the RGB values for each pixel, and those values refer to the output device (monitor, TV, printer).

In the raw files, the data refers to the light captured from the real scene.
To me this "referred" business is still jargon and still hard to make sense of. It seems arbitrary.
You have per-pixel numbers in R,G,G,B channels in raw and per-pixel R,G,B numbers in jpeg. What do those numbers represent?

In a raw file the numbers measure, roughly speaking, incoming photons from the scene. So it's a digitally encoded representation of a real scene (technically, the scene light + lens + Bayer filter + noise).

In a jpeg file the numbers represent the brightness of pixels on a monitor.
You say that the decoded RGB values in a jpeg are "referred" or "refer" (two different voices) to the output device whereas the raw data "refers" to the light captured from the real scene. But the data in the jpeg also "refers" to the light captured from the real scene. That's why it looks like, for example, the cat. And the raw data, when viewed in a raw viewer, also "refers" to the monitor.
Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg.
That doesn't mean there's no concept of colours in raw - but raw viewers need to perform more transformations before renderable RGB values are produced, and those transformations aren't standardised. So the exact default 'look' of raw images (before any editing) is not well defined.
More inscrutable stuff. If "the exact default look ... is not well defined" doesn't that mean that raw files, prior to interpretation, don't look like anything in particular and don't have any particular colors?
Neither raws nor jpegs have any particular 'look' before they're rendered.

With raw formats, we can define the default look as the look of OOC jpegs or jpegs embedded in raw files. That is, with demosaicking, white balance and picture style applied. But the exact processing is usually a trade secret only known to the camera manufacturers. Adobe attempts to simulate the out of camera look with their camera matching profiles in Lightroom.
At the same time the above makes raw files highly 'malleable'.
So much for the light from the real scene! But the malleability if the raw does seem to be its main selling point. Of course, you can edit jpegs too. It's just that "information" is said to be lost, and "artifacts" are said to be introduced.
There's always a big loss of information when a raw file gets converted/exported into JPEG.
Is there a loss of information, as that term is used in plain English, or is there just a loss of data?
It's a loss of visual information.
One can export a raw file into JPEG or other formats, but the reverse operation isn't possible without losses.
What about TIFF or DNG?
DNG is based on TIFF, and so do many raw formats - they're basically modified and extended TIFF.

You can do conversions between raw and DNG and TIFF with minimal losses. However, when you convert to the standard TIFF, you're applying demosaicking and white balance and you're effectively making it "output-referred". You can't convert from TIFF back to a RAW format without some losses.
On one level I understand everything you say and I "know what you mean". On another level I still maintain, among other things, that the distinction you want to draw is arbitrary since the data in either raw files or jpegs can be "referred" to either the original scene or a display medium.
It's not arbitrary - again just ask the question: what do those pixel values represent in case of raw and in case of jpeg.

If you don't like 'scene/output referred' duality :) you can use 'upstream/downstream' terminology. Just a different view.
While I am at it, I must also question "Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg." Not spatially closer, I am sure. But more importantly, we don't have access to the "processing chain". We only have access to its outputs.
Well in theory you can use libraw and write your own processing chain.
In the case of raw files this is a bunch of numbers that have an indirect relationship to some photons that were briefly available. Suitable processing can turn these numbers into something else, an image. The image may look surprisingly like what we think should have been there, especially after idealizing modification in a raw converter.
Yes, only I think raw formats represent images to start with.

For example, the universal raw format DNG is defined as

"File format for storing and interchanging CAM_RAW (camera raw) images".

 
The difference is that raw files are scene-referred and jpeg files are output-referred.
To help those who are barely aware of color management and read that as inscrutable jargon, it might be helpful if you explain what those two terms mean and why understanding the difference is important.
When software works with JPEG (or HEIF etc.), it decodes the RGB values for each pixel, and those values refer to the output device (monitor, TV, printer).

In the raw files, the data refers to the light captured from the real scene.
To me this "referred" business is still jargon and still hard to make sense of. It seems arbitrary.
You have per-pixel numbers in R,G,G,B channels in raw and per-pixel R,G,B numbers in jpeg. What do those numbers represent?

In a raw file the numbers measure, roughly speaking, incoming photons from the scene. So it's a digitally encoded representation of a real scene (technically, the scene light + lens + Bayer filter + noise).
Exactly! Sensor pixels view the world through a mosaic of the colour filter array. Each pixel receives only a part of colour information and is missing 2 out 3 colour channels. This missing information needs to be reconstructed from neighbouring pixels using weights and biases informed by white balance and other JPEG engine settings.
Yes, however in jpeg, before decoding, there's no per-pixel RGB information either. Moreover jpeg decoders aren't deterministic in principle.
In a jpeg file the numbers represent the brightness of pixels on a monitor.
and a colour of each pixel is defined, unlike that for a raw file.
Depends on what you mean by 'defined'. RGB values for each pixel are decodable in both raw and jpeg. But when you look into the contents of a jpeg file, you won't find any pixels right away.
You say that the decoded RGB values in a jpeg are "referred" or "refer" (two different voices) to the output device whereas the raw data "refers" to the light captured from the real scene. But the data in the jpeg also "refers" to the light captured from the real scene. That's why it looks like, for example, the cat. And the raw data, when viewed in a raw viewer, also "refers" to the monitor.
Yes, but in the processing chain, raw data is much closer to the scene than RGB values in jpeg.
Perhaps in terms of information content.
Neither raws nor jpegs have any particular 'look' before they're rendered.
Raw data doesn't have a look, it needs to be turned into a raster image through demosaicking first.
Its' because it's 'scene-referred' (or 'input-referred').

There's no raster image in jpeg either, one has to apply jpeg decoding algorithm first.
With raw formats, we can define the default look as the look of OOC jpegs or jpegs embedded in raw files.
It is a default processing, there is no look.
Either way the 'look' is created after applying some processing.
That is, with demosaicking, white balance and picture style applied. But the exact processing is usually a trade secret only known to the camera manufacturers. Adobe attempts to simulate the out of camera look with their camera matching profiles in Lightroom.
Exactly my point. The colour encoding in raw files does not define colours uniquely.
Uniqueness is a bit vague thing here, because jpeg codecs aren't deterministic either.

Major difference is not the 'look' (which both raw and jpeg have) but what those formats represent.
What about TIFF or DNG?
DNG is based on TIFF, and so do many raw formats - they're basically modified and extended TIFF.
They are all essentially a grid, a raster, but they contain different information. TIFF and DNG are raster images that contain colour information for each pixel.
Demosaicing in DNG is optional.
Raw files contain photon counts seen by individual pixels.
All raw formats are raster formats by definition. Missing colour information is typically recovered by interpolation. But with jpeg, decoders have to recover even more information - jpeg loses more of the input RGB information.
You can do conversions between raw and DNG and TIFF with minimal losses. However, when you convert to the standard TIFF, you're applying demosaicking and white balance and you're effectively making it "output-referred". You can't convert from TIFF back to a RAW format without some losses.
Agreed. So there is a difference between "processed colour information for each pixel" and "raw colour representation of the scene".
Yes, 'scene-referred' vs 'output-referred'.
 

Keyboard shortcuts

Back
Top