exiv2
exiv2 copied to clipboard
RafImage::readMetadata shouldn't read the entire embedded JPEG
Fujifilm raw files include an embedded preview JPEG containing EXIF metadata. Currently, exiv2 loads the entire embedded JPEG, which is quite expensive-- roughly 5MB of reading to get metadata for a 30MB file. This is particularly slow on an SD card.
Instead of reading the entire JPEG file, it should scan for just the metadata chunks it wants to read.
Compare https://github.com/Exiv2/exiv2/blob/main/src/rafimage.cpp#L324 and https://github.com/Exiv2/exiv2/blob/main/src/jpgimage.cpp#L365