Writing XMP metadata to jp2 files erases all XMP metadata in file
henryborchers opened this issue · comments
Describe the bug
When writing any Xmp metadata to a jp2 file, the resulting file has all xmp metadata erased.
To Reproduce
Steps to reproduce the behavior:
exiv2 -px myfile.jp2
Xmp.xmp.CreateDate XmpText 19 2011-05-12T12:09:15
Xmp.xmp.CreatorTool XmpText 23 Capture One 9.3 Windows
Xmp.aux.SerialNumber XmpText 8 EJ031825
Xmp.aux.ImageNumber XmpText 6 221317
Xmp.aux.Firmware XmpText 96 P65+-M, Firmware: Main=5.2.2, Boot=2.3, FPGA=1.2.4, CPLD=5.0.1, PAVR=1.0.3, UIFC=1.0.1, TGEN=1.0
Xmp.photoshop.DateCreated XmpText 19 2011-05-12T12:09:15
Xmp.photoshop.Credit XmpText 14 Jenna Courtade
Xmp.photoshop.LegacyIPTCDigest XmpText 32 549E5EDC2A6B82049187A91955643B63
Xmp.iptc.CreatorContactInfo XmpText 0 type="Struct"
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiEmailWork XmpText 41 digitizationservices@library.illinois.edu
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiTelWork XmpText 14 +1(217)2442062
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrPcode XmpText 5 61801
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork XmpText 64 https://www.library.illinois.edu/preservation/digitization-servi
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrExtadr XmpText 21 1408 W. Gregory Drive
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity XmpText 6 Urbana
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry XmpText 13 United States
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrRegion XmpText 8 Illinois
Xmp.dc.title LangAlt 1 lang="x-default" SLC
Xmp.dc.creator XmpSeq 2 University of Illinois Library, University of Illinois Library
exiv2 --Modify "set Xmp.dc.creator library" myfile.jp2
exiv2 -px myfile.jp2
The console shows nothing.
I get the same result when I try with the C++ api as well.
This is not a problem for tiff files nor is a problem with Exif metadata. I can't speak to other file formats because I only work with jp2 and tiff files.
Desktop (please complete the following information):
- OS and version: macOS 13.6
- Exiv2 version and source: 0.28.1 from homebrew and from source
- Compiler and version: Apple clang version 15.0.0
- Compilation mode and/or compiler flags: cmake defaults
The last version that I can confirm this working is v0.27.6.
Can anybody else confirm this?
Think I might have found why. Can you please test #2890?
@kmilos this looks like it fixes it.
After updating to 0.28 I got a lot of errors with image processing on jp2 files and I thought I was taking crazy pills.
Nice job on getting this fixed.
Thanks for catching this and testing!
Thanks for catching this and testing!
@kmilos Of course! Exiv2 is one the greatest tool/friend to digital archivists. It's faster and more robust than any other alternative out there.