Hi
i am not sure if this is a bug or the expected behaviour.
I have a jpeg file with EXIF information that also includes a Photoshop IRB marker inside APP13 (0xFFED).
libexif ignores the exif information of that file. Debugging it, is seems that in exif_data_load_data(), that marker is not identified, and the file parsing stops here:
* Unknown marker or data. Give up. */
840 exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
841 "ExifData", _("EXIF marker not found."));
I've modified the function to detect the marker APP13 (0xFFED), and in that case, move to the next marker (0xFF).
After changing that, the library finds the EXIF data in the picture.
The image is copyrighted and cannot upload it. I will try to find another one with this marker to upload a test case.
regards
I cannot find anther image with the APP13 marker located before the exif marker. So, this is how is solved ( in exif-data.c):
Added APP13 definition:
#undef JPEG_MARKER_APP13
#define JPEG_MARKER_APP13 0xed
and in exif_data_load_data change:
/* JPEG_MARKER_APP0 */
if (d[0] == JPEG_MARKER_APP0 ) {
to:
/* JPEG_MARKER_APP0 */
if (d[0] == JPEG_MARKER_APP0 ||
d[0]==JPEG_MARKER_APP13) {
After that, Photoshop segment is bypassed, and EXIF info is correctly read.
I think maybe that should be done for all known EXIF app segments, just in case any of them gets located before the EXIF segment.
The problem was solved in a more general way in commit a774b0d4.