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

Issue loading float DNG file from Photomatix7 #7263

Closed
nvki opened this issue Dec 4, 2024 · 7 comments · Fixed by #7264
Closed

Issue loading float DNG file from Photomatix7 #7263

nvki opened this issue Dec 4, 2024 · 7 comments · Fixed by #7264
Labels
scope: file format Camera or image file formats
Milestone

Comments

@nvki
Copy link

nvki commented Dec 4, 2024

Trying to open a 32 bit float image generated by Photomatix7, rawtherapee doesn't seem to understand how to interpret that file. The preview turns black when trying to develop it and no options for demosaicing are listed.
rt
When clearing the processing profile/deleting the .pp3 the preview is displayed correctly again - so apparently rt can load the thumbnail from the raw file
rt2

A 32 bit float dng generated with hdrmerge can be developed just fine however, both files can be opened/developed by AffinityPhoto

to make sure it's not a DNG 1.7 issue, checked with exiftool and both .dng files have DNG version 1.4 with 32bit float samples. comparing the exif tag values (via python+exifread) they also seem identical - image make and model are present, so rt should be able to identify it's a camera with an x-trans sensor?
...so perhaps it's an issue with the exif tag locations? but copying the exif from the hdrmerge file over to the photomatix file also doesn't change anything

i uploaded the two .dng files in question here:
https://nuki.m4studios.at/_DSF3289And8more_photomatix.dng
https://nuki.m4studios.at/_DSF3289And8more_hdrmerge.dng

and here's the exif info of both files (read via python/exifread):
_DSF3289And8more.txt

@kmilos
Copy link
Contributor

kmilos commented Dec 5, 2024

image

Please share your files via a different, trusted service.

Wild guess (as your method for metadata extraction only dumps tags for the embedded preview/thumbnail and not the main/raw image): HDRMerge doesn't use deflate compression for the float DNGs, while Photomatix does. One needs to double-check if LibRaw used by RT is built w/ zlib support then.

Or you simply need to try w/ RT 5.11 first, as 5.10 doesn't use LibRaw and probably doesn't support compressed float DNGs anyway...

@nvki
Copy link
Author

nvki commented Dec 5, 2024

hm, - the files are on my private webspace, seems the ssl certificate expired
alt link: https://filetransfer.io/data-package/uIvytHyO#link

good idea checking whether its deflate. forgot to mention i'm running rt 5.11

@kmilos
Copy link
Contributor

kmilos commented Dec 5, 2024

image

They're both deflate compressed, but the Photomatix one is demosaiced 3-channel "LinearRaw", looks like that is somehow not supported...

Edit: Indeed, unprocessed_raw tool from LibRaw gives

$ unprocessed_raw.exe -T _DSF3289And8more_photomatix.dng
Processing file _DSF3289And8more_photomatix.dng
Image size: 6246x4159
Raw size: 6246x4159
Margins: top=0, left=0
Unpacked....
Only Bayer-pattern RAW files supported, sorry....

@nvki
Copy link
Author

nvki commented Dec 5, 2024

awesome find, makes sense there's no debayering options then
single channel should just be y=rrcoeff + bbcoeff +g*gcoeff so maybe i can edit the dng with imageio to merge the components back. the x-trans pattern should be read from the metadata and applied to y by rt if i understand correctly

but good to know that photomatix doesn't create raw dng files - i was hoping to improve my previous .exr workflow and directly develop the merged bracket in rt without the need for intermediate files. that wouldnt work anyways with an rgb dng

@kmilos
Copy link
Contributor

kmilos commented Dec 5, 2024

Ah, the message above is only about writing out the data to disk by unprocessed_raw, it is still supported and decoded/unpacked by LibRaw ok...

@Lawrence37 Lawrence37 added the scope: file format Camera or image file formats label Dec 7, 2024
@Lawrence37 Lawrence37 added this to the v5.12 milestone Dec 7, 2024
@Lawrence37
Copy link
Collaborator

Since LibRaw can read the image and RawTherapee is trying to use dcraw instead, the fix could be as easy as detecting the dng type and using LibRaw for that type.

@Lawrence37 Lawrence37 linked a pull request Dec 8, 2024 that will close this issue
@Lawrence37
Copy link
Collaborator

I created a pull request with the code that can read the Photomatix DNG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: file format Camera or image file formats
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants