exiv2 icon indicating copy to clipboard operation
exiv2 copied to clipboard

RafImage::readMetadata shouldn't read the entire embedded JPEG

Open rmmh opened this issue 3 years ago • 0 comments

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

rmmh avatar Sep 26 '21 21:09 rmmh