Feature #465

Updated by Robin Mills about 5 years ago

JPEG parser should be able to read/write standalone JPEG APP1 segments, leave the code common in JpegImage.
An App1Image class derived from JpegBase will deal with the format recognition.

*Additional information:*

From an email exchange with Gilles Caulier:

This seems to be a complete JPEG APP1 Exif segment. To support this in Exiv2,
I'll need to tweak the JPEG parser a bit to also accept such a segment alone,
but will have to be very careful to avoid side effects.
A quick hack is faster: The TIFF header starts 10 bytes into the file, so just
add 10 from the beginning of the data buffer and use ExifData::load...

// Read the file into a memory buffer
long len = io.size();
DataBuf buf(len);, buf.size_);
if (io.error() || io.eof()) throw Error(14);

ExifData exifData;
int rc = exifData.load(buf.pData_ + 10, buf.size_ - 10);


On Tuesday 11 April 2006 04:44, you wrote:
> Andreas,
> Here we are a bin raw exif file extrcated from my Minolta Dynax 5D camera
> using gphoto2 interface (via digikam camera gui)
> This file cannot be parsed by Exiv2. I don't know why...
> But, this file can be parsed using libexif (via old implementation of
> digikam).
> Can you give me your viewpoint ? This problem can be fixed easily into
> Exiv2 core ?
> Thanks in advance
> Gilles Caulier