Hi,
is it possible to specify custom IPTC records via configuration? What's working perfectly is adding custom tags to the IPTC ApplicationRecord 2:xxx, but how can I add an unsupported record? I get Warning = Unrecognized IPTC record 247 (ignored)
I'd like to extend Image::ExifTool::IPTC:Main like this: (from IPTC.pm)
%Image::ExifTool::IPTC::Main = (
[...]
240 => {
Name => 'IPTCFotoStation',
SubDirectory => {
TagTable => 'Image::ExifTool::IPTC::FotoStation',
},
},
247 => {
Name => 'IPTCCustomRecord247',
SubDirectory => {
TagTable => 'Image::ExifTool::IPTC::IPTCCustomRecord247',
},
},
Is this possible via Image::ExifTool::UserDefined?
Best,
Andreas
Hi Andreas,
See the example config file (https://exiftool.org/config.html) for an example.
- Phil
Thanks, I know this file.
There is an example how to add an IPTC Tag, but not a whole IPTC Record.
I'd like to add IPTC field 247:200 as custom field.
Sorry. I understand now.
This is basically the same as the example for adding a new XMP namespace. The only trick is the necessary entries in the new table to allow tags to be written. Here is an example config file to do this:
%Image::ExifTool::UserDefined::IPTCCustomRecord247 = (
GROUPS => { 0 => 'IPTC', 1 => 'IPTC', 2 => 'Other' },
WRITE_PROC => \&Image::ExifTool::IPTC::WriteIPTC,
CHECK_PROC => \&Image::ExifTool::IPTC::CheckIPTC,
WRITABLE => 1,
100 => {
Name => 'MyCustomTag',
Format => 'string[0,256]',
},
);
%Image::ExifTool::UserDefined = (
'Image::ExifTool::IPTC::Main' => {
247 => {
Name => 'IPTCCustomRecord247',
SubDirectory => { TagTable => 'Image::ExifTool::UserDefined::IPTCCustomRecord247' },
},
},
);
1; #end
- Phil
THANKS, that worked.
Best, Andreas