Menu

#121 Command line exif program removes XMP information in generated JPEGs.

None
open-accepted
nobody
exif (14)
5
2018-06-30
2014-10-27
Rob Norris
No

When exif writes a 'modified' JPEG file from an original with XMP information (e.g. as per the attached file), then the new file does not contain XMP information.

Such as running the exif tool to insert any thumbnail image eg:

exif -n=thumb.jpg blank-xmp.jpg

Checking the XMP information can be viewed via recent versions of eog or any version of exiftool e.g.:

exiftool -xmp blank-xmp.jpg

exiftool -xmp blank-xmp.jpg.modified.jpeg

Indeed creating/inserting XMP information on any image file (this was how the attachment was created) can be done with exiftool:

exiftool -xmp:usercomment=XMP Test Comment' <file.jpg> -overwrite_original

I believe that libexif doesn't specifically support XMP information, but I think that XMP information is in the APP1 section of a JPEG file, so then the exif tool should maintain it.

1 Attachments

Discussion

  • Dan Fandrich

    Dan Fandrich - 2018-06-30

    The attached image doesn't have an XMP section but I was able to easily reproduce the problem. The issue is probably that XMP and EXIF are both stored in an APP1 but exif only cares about EXIF. I agree, it should preserve any sections it doesn't recognize, including APP1 sections that are not EXIF.

     
  • Dan Fandrich

    Dan Fandrich - 2018-06-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     When exif writes a 'modified' JPEG file from an original with XMP information (e.g. as per the attached file), then the new file does not contain XMP information.
    
     Such as running the exif tool to insert any thumbnail image eg:
    
    • status: open --> open-accepted
    • Group: -->
     

Log in to post a comment.