Making a DNG RAW file be recognized as non-linear by RAW developers

Started by Guillermo Luijk, October 16, 2022, 01:42:52 PM

Previous topic - Next topic

Guillermo Luijk

First of all let me say this is not so much a Exiftool's issue, but just a question to understand if what I want to achieve is possible through some tag set on a DNG RAW file using Exiftool.

The point is this: usually DNG RAW (Bayer) files are encoded as linear (gamma=1.0) data. But this is not the best option to encode a large dynamic range because of a low number of levels devoted to the deep shadows of an image, which can lead to posterization.

I have no problem in creating an integer 16-bit DNG RAW file with non-linear (e.g. gamma=2.2) data, but when opening it on any RAW developer such as Adobe Camera RAW, the data is obviously intepreted as linear and the the image looks overexposed.

What I want to know is if we can set some meta tag parameter on the DNG file to inform the RAW developer reading it that the data encoded is not linear.

I have been trying this:

exiftool -ProfileToneCurve="0 0.5 0.1 1 1" meanstacking.dng

and also in case the 0..255 scale is used:

exiftool -ProfileToneCurve="0 128 16 255 255" meanstacking.dng


The ProfileToneCurve is correctly set on the DNG file, but the RAW developer (Adobe Camera RAW) ignores it and renders the image in the same way.

The testing DNG file (with linear data in this case) is this:
https://github.com/gluijk/dng-from-tiff/blob/main/exercise2-meanstacking/meanstacking.dng

Any experience or thoughts?

Regards