Writing Exif data to RAW files
Tobias Leupold
tl at stonemx.de
Sat Sep 10 18:20:48 BST 2022
Hi all,
after some investigation (thanks to Angel for providing example files!), it
seems like actually, KGeoTag COULD write Exif headers to at least some RAW
formats.
I'm completely unaware of the whole RAW thingy, I never had a camera producing
such files ;-)
Apparently, there's a set of RAW formats which are built upon TIFF. Thus,
apparently, QImage and libkevi2 can read those, if a recent enough exiv2 is
used (which should be the case by now).
By name: dng, nef, pef, orf, srw and cr2.
The current MIME type check looks at QMimeType::inherits(), and image/x-canon-
cr2 does apparently inherit image/tiff. Thus, a cr2 file is loaded (and yes,
it's also displayed correctly!).
When it comes to writing, libkexiv2 refuses to touch the file though. This is
due to a check inside libkexiv2 on what was set using
KExiv2Iface::setWriteRawFiles, which must be enabled explicitely. After having
set this to true, libkexiv2 writes the Exif header in the current case.
So, tested with cr2 files, we could as well support those.
Question is: Why is this disabled by default libkexiv2-side? And how should we
deal with this? Add another option "Enable writing to RAW files"? And only add
"cr2" with the MIME type "image/x-canon-cr2", as we now know it works for
those?
I'm a bit unsure at this point ... all comments are welcome!
Cheers, Tobias
More information about the KGeoTag
mailing list