Is there a way to add custom Exif tag via Exiv2? #2651
-
Hi, I noticed that there is a way to register custom XMP data, is it possible to do similar thing to EXIF data? If not, is it possible to modify Exiv2 code to add my custom tag? I have tried add a new IfdId, and follow other IfdId to add code in corresponding sections. But I met a issue: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@tangxun1688 Exif on the other hand uses a fixed list of pre-defined tags. I wouldn't advise adding your own general Exif tags as the IDs are limited and a future Exif spec may reuse your ID. In the Exif specification there is a 'makernotes' section for camera/scanner manufacturers to add custom tags. It would be possible to add your own 'makernotes' but in reality, this is impractical as it is a lot of work. Also, every time Exiv2 releases a new version, you would need to re-add your own definitions to the source code. For completeness, IPTC metadata also uses pre-defined tags but is not used any more in modern images. For custom tags, I would recommend using XMP as this is by far the easiest and simplest method. There is a discussion on adding new XMP tags in the exiv2 app manpage. |
Beta Was this translation helpful? Give feedback.
@tangxun1688
Although Exiv2 contains some XMP tags, the standard is based on XML and any unknown tags are automatically added. This flexibility allows you to easily create your own custom definitions.
Exif on the other hand uses a fixed list of pre-defined tags. I wouldn't advise adding your own general Exif tags as the IDs are limited and a future Exif spec may reuse your ID. In the Exif specification there is a 'makernotes' section for camera/scanner manufacturers to add custom tags. It would be possible to add your own 'makernotes' but in reality, this is impractical as it is a lot of work. Also, every time Exiv2 releases a new version, you would need to re-add your own definitions to …