Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adobe DNG GainMap support #212

Open
StudioPetrikas opened this issue Dec 3, 2023 · 5 comments
Open

Adobe DNG GainMap support #212

StudioPetrikas opened this issue Dec 3, 2023 · 5 comments

Comments

@StudioPetrikas
Copy link

StudioPetrikas commented Dec 3, 2023

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!

@letmaik
Copy link
Owner

letmaik commented Jan 29, 2024

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.

@StudioPetrikas
Copy link
Author

Understood. I will create a thread on the forum.
Thanks!

@StudioPetrikas
Copy link
Author

StudioPetrikas commented Feb 1, 2024

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?

@letmaik
Copy link
Owner

letmaik commented Feb 1, 2024

I'm afraid I won't have time to look into this myself. The dependency on the Adobe DNG SDK might be a problem.

@letmaik
Copy link
Owner

letmaik commented Feb 1, 2024

Related: #207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants