Adobe DNG GainMap support
Hello, First of all - thank you for your work on this excellent tool.
Just wanted to ping regarding Adobe DNG GainMap support.
If you aren't familiar - it is something that is usually added to DNGs produced by smartphones. It's basically a per-channel lens correction, that gains the data based on the embedded 2D image. This helps tremendously with Vignetting and hue shifts produced by the tiny lenses in smartphones.
It also helps with pink highlight issues (with highlight reconstruction)
Here's the Adobe DNG spec, page 94: https://www.kronometric.org/phot/processing/DNG/dng_spec_1.4.0.0.pdf
It comes up as Opcode List# in Exif info. Thank you so much once again!
Since rawpy is built on libraw, a first step would be to ask in https://www.libraw.org/forum/15 whether libraw supports it, and if not, if support for it can be added.
Understood. I will create a thread on the forum. Thanks!
Got a reply from Alex Tutubalin:
"If LibRaw is compiled with Adobe DNG SDK: it is possible to process via DNG Stage2/Stage3 by specifying corresponding rawoption bits:
Process Stage2/3 only if OpcodeList2/3 present: LIBRAW_RAWOPTIONS_DNG_STAGE2_IFPRESENT,LIBRAW_RAWOPTIONS_DNG_STAGE3_IFPRESENT
Forced Stage2/3 processing: LIBRAW_RAWOPTIONS_DNG_STAGE2 and LIBRAW_RAWOPTIONS_DNG_STAGE3
If one want to extract specific DNG/TIFF/EXIF tags: use exifparser_handler to setup own callback function."
I can't make much sense of it, is this something that rawpy could use?
I'm afraid I won't have time to look into this myself. The dependency on the Adobe DNG SDK might be a problem.
Related: https://github.com/letmaik/rawpy/issues/207