This library is a wrapper for the Exiftool command-line application (https://exiftool.org) written by Phil Harvey. It provides the full power of Exiftool to Ruby: reading and writing of EXIF-data, IPTC-data and XMP-data. Branch master is for actual development and branch compatibility-version is for compatibility with Ruby 1.8 and exiftool versions prior 7.65.
GNU Lesser General Public License v2.1
213
stars
52
forks
source link
IPTC Data types, "seem" to work but don't get persisted. #41
MiniExifTool seems to validate proper IPTC data structure, and then accepts ONLY the properly formatted structure, but then never persists the validated structure. Here is an example where 'sample.jpg" can be ANY ".jpg" file.
photo = MiniExiftool.new 'sample.jpg'
photo["CopyrightOwner"] = "jason"
=> "jason"
photo.save
photo.errors
=> {"copyrightowner"=>"Warning: Improperly formed structure for XMP-plus:CopyrightOwner"}
So far, this is absolutely correct. As per the IPTC spec, CopyrightOwner requires 2 children nodes, "CopyrightOwnerID" && "CopyrightOwnerID".
MiniExifTool seems to validate proper IPTC data structure, and then accepts ONLY the properly formatted structure, but then never persists the validated structure. Here is an example where 'sample.jpg" can be ANY ".jpg" file.
So far, this is absolutely correct. As per the IPTC spec, CopyrightOwner requires 2 children nodes, "CopyrightOwnerID" && "CopyrightOwnerID".
So if we add those:
But the NEITHER the output file, nor the existing photo object have those values saved:
NOR
Expected Result: "Copyright Owner" would be persisted in the EXIF data as per IPTC spec.