GNOME Bugzilla – Bug 411861
Jpegtran/libjpeg writes a JFIF marker, which is incompatible with EXIF
Last modified: 2007-03-23 18:24:34 UTC
Please describe the problem: jpegtran/libjpeg creates jpeg files with a JFIF (APP0) marker, which is incompatible with Exif. The Exif standard requires that the EXIF (APP1) marker be first extra marker, but JFIF has the same requirement. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
More information on the issue can be found here: http://sylvana.net/jpegcrop/exifpatch.html https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106060 The JFIF marker can be omitted by setting "dstinfo.write_JFIF_header = FALSE;" for exif files. I also found bug 334481 for f-spot, which is probably caused by this issue.
Created attachment 84074 [details] [review] Omit the JFIF marker if an EXIF marker is found
Patch committed to trunk and metadata-ideas (where the JFIF tags are shown in the metadata view). Thanks! - Mike
I noticed an similar problems for the exif thumbnails. According to the EXIF specs, the thumbnail should not contain any APPn or COM markers. But jpegtran does write a JFIF marker by default.
Created attachment 85178 [details] [review] Omit all markers for the EXIF thumbnail This patch suppresses all APPn and COM markers for the EXIF thumbnail. I also moved the jpegtran_internal "path" parameter to the mcu callback "userdata" parameter, because I believe that is where it belongs. (I can provide a patch without this change if required.)
Patch applied; thanks! - Mike