Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.89k stars 323 forks source link

DNG from Huawei P20 Pro CLT-L29 shows f/0.0 0.0s iso0 0.00mm #6026

Closed alexkiri closed 1 month ago

alexkiri commented 3 years ago
kmilos commented 3 years ago

I venture this is similar to what was happening in darktable: metadata was only searched for in the Exif IFD, but most smartphone DNGs don't have it (nor is Exif part of the DNG spec to begin with). Most (basic) metadata of the DNG is stored in the main IFD0 instead.

You can check this is indeed the case by e.g. running exiftool -a -u -s -g1 on this sample.

This was also partly addressed by the "easy access" API of exiv2, so that should also help once RT makes the switch.

alexkiri commented 3 years ago
FNumber                         : 1.8
ISO                             : 3200
DateTimeOriginal                : 2020:08:27 01:41:48
FocalLength                     : 5.6 mm

Yup, exiftool shows the correct info

kmilos commented 3 years ago

They key, however, is where that info is stored in the file: IFD0; there is (normally) no Exif IFD in DNGs (TIFF/EP).

The location you get with the -g1 (or -G1) options of exiftool, and you can also tell from the Exif.Image (IFD0) vs Exif.Photo (Exif IFD) prefix when you do exiv2 -pa:

Exif.Image.FNumber                           Rational    1  F1.8
Exif.Image.ISOSpeedRatings                   Short       1  3200
Exif.Image.DateTimeOriginal                  Ascii      20  2020:08:27 01:41:48
Exif.Image.FocalLength                       Rational    1  5.6 mm
alexkiri commented 3 years ago

Here is some extra relevant info


[IFD0]          FNumber                         : 1.8
[IFD0]          ISO                             : 3200
[IFD0]          DateTimeOriginal                : 2020:08:27 01:41:48
[IFD0]          FocalLength                     : 5.6 mm
[IFD0]          TIFF-EPStandardID               : 1 0 0 0
[IFD0]          DNGVersion                      : 1.4.0.0
[Composite]     Aperture                        : 1.8
[Composite]     ShutterSpeed                    : 30
[Composite]     FocalLength35efl                : 5.6 mm
Lawrence37 commented 1 month ago

The link to the raw file does not work anymore. Do you have a sample file to share?

FloBEAUG commented 1 month ago

The link to the raw file does not work anymore. Do you have a sample file to share?

Sorry, the problem isn't on dev branch anymore. Thx

alexkiri commented 1 month ago

Sorry, I removed the file from drive, I forgot about this issue. I just tested with a new raw file from the same phone, and it appears to work correctly with the latest stable version 5.11. Many thanks! This issue can be closed