Tone Curves in RT

Hello! I am a beginner at RawTherapee and trying to slowly learn everything about the program and what it has to offer. However, there is one thing that I am stuck on. When loading up a sample RAW file such as a .cr2 or .arw, how does RT retrieve or calculate this exposure tone curve? The reason why I am asking is because I am currently trying to solve a problem with converting proprietary RAW file formats into an “open source” DNG format. I am using a free conversion program raw2dng on Linux. Whenever the image is converted to a dng, the image’s tone curve is slightly darker than the original image. My overall goal is to eventually figure out how to automatically fix these exposure curves so the image is practically identical to its original counterpart.

What proprietary raw formats? Most are supported natively.

There is also more to it, if you are talking about the auto-matched curve. If you change the model of curve used you will get very very different results in the resulting color. I think RT defaults to film but the other selections can give more or less saturated colors… I’m also interested why you would convert a supported format??

This nuance might also be important…

I apologize! I worded my question a bit wrong. I am working on a program that will only take dngs as an input. The main problem I am experiencing is trying to preserve the original exposure curve from a raw format (.cr2, .arw, .nef) and be able to apply it to the converted dng package. After testing out many photos and types of files, the color information seems to be very similar, but I can’t seem to get the exposure information to apply correctly.

I am not sure about this …what RT is doing is applying a curve based on some math and the embedded jpg file…the raw has no exposure or tone curve that can be read…

thanks for the reply! I have been trying to research this topic on RawPedia, but couldn’t find any information pertaining to what steps RT takes for setting the exposure when a raw image is first loaded up. Also thanks for the forum link! Ill take a look at it right now.

If you just search automatch you will come upon several threads …

Here is one

Perhaps I’m missing your question entirely but remember that typically you are looking at the embedded JPG when viewing a raw image in any6 raw convertor. Once you enter the edit of the image, the raw image will indeed look different/flat in need of correcting WB, exposure, etc.

Raw data is linear and has no curves or much of anything else applied. What you typically see when opening a raw file for viewing (not editing) is the embedded JPEG that was rendered from the raw data by the camera. When you then open it for editing some sort of default processing will be applied, which varies from program to program. RawTherapee can try to match the embedded JPEG, but that’s just a convenience thing and in any case has nothing to do with the raw data itself.

As for DNGs, they are complicated beasts, and can contain data in all sorts of different formats - not all of which are “raw”.


Thank you everyone! I see now where the embedded JPEG has a good amount of loss so it was causing the issues with the exposure. Also, sorry for the confusion, I am not super familiar with these things so it means a lot!

1 Like

I’m not sure that’s entirely true, although you did say “typically”. My RT 5.8 does the conversion right away as default.

Definitly not if you are just in the browser

I don’t know what that means. I was talking about opening a raw file.

There is none for any raw format I’m familiar with. In theory DNG supports embedding a tone curve as part of the color profile, but no camera does this.

RawTherapee can attempt to estimate the curve used by the camera with the Auto Matched Tone Curve function if there is an embedded JPEG available, but it’s only an attempt.

I’m quite familiar with the older X3F format. In meta-data, it provides a CLUT for use by the raw converter.