I created a home-grown tag in the config file to record the date and time a file was passed through my home-grown post-processor program. The config file reads,
'Image::ExifTool::Exif::Main' => {
0xdac1 => {
Name => 'ekkidee',
Writable => 'string',
WriteGroup => 'IFD0',
},
0xdac2 => {
Name => 'libClass',
Writable => 'string',
WriteGroup => 'IFD0',
},
0xdac3 => {
Name => 'postProcDate',
Writable => 'date',
WriteGroup => 'IFD0',
},
},
The call to set the date and time reads,
exiftool '-EXIF:postProcDate<$now' \
When I run this, I don't see any result in the file. The command,
exiftool -a -u -g1 filename
does not show the home-grown tag. Then, when I run,
exiftool -config $exifToolConfig -postProcDate='2020-11-28' filename
I get
Sorry, Can't write date values on this platform
Warning: Invalid value for IFD0:PostProcDate - filename
I'm at a loss to figure out where to go next. Really all I want to do is create a home-grown EXIF tag that has a date format. I've never seen the "can't write date values on this platform" error message before, and I'm wondering if this is really the problem or it's something else. The other two home-grown tags ("Ekkidee" and "libClass") both work as expected.
Thanks!
I should specify, platform is MACOS 10.14.6 Mojave.
If you make the tag part of the EXIF group, you will not be able to view it's value without using the config file. For this reason, it's often better to create new tags in the XMP namespace.
Also, you don't use a dollar sign in front of the config file name, unless it is actually part of the file name.
Quote from: StarGeek on November 28, 2020, 05:33:39 PM
If you make the tag part of the EXIF group, you will not be able to view it's value without using the config file. For this reason, it's often better to create new tags in the XMP namespace.
Also, you don't use a dollar sign in front of the config file name, unless it is actually part of the file name.
Based on your recommendation, I moved the PostProcDate tag into the XMP group:
'Image::ExifTool::XMP::Main' => {
0xdac3 => {
Name => 'postProcDate',
Writable => 'date',
WriteGroup => 'IFD0',
},
},and with the command line,
exiftool -config config_file -postProcDate="2020:11:29 18:44:19" file.jpgI receive,
0 image files updated
1 image files unchangedI checked
exiftool -config config_file -listw -XMPand the home-grown tag PostProcDate is in the list, but the custom tag is still not appearing in the file..
Here's a complete config file. If you want to add it to an existing config file, copy the part between the hashtag bars.
%Image::ExifTool::UserDefined = (
#################
'Image::ExifTool::XMP::xmp' => {
postProcDate => {
Writable => 'date',
Groups => { 2 => 'Time' },
PrintConv => '$self->ConvertDateTime($val)',
PrintConvInv => '$self->InverseDateTime($val,undef,1)',
},
},
#################
);
1; #end
Example usage
C:\>exiftool -config temp.config -P -overwrite_original -postProcDate=now y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -g1 -a -s -postProcDate y:\!temp\Test4.jpg
---- XMP-xmp ----
PostProcDate : 2020:11:29 17:01:35-08:00
Quote from: StarGeek on November 29, 2020, 08:02:34 PM
Here's a complete config file.
.....
Wow awesome, that looks like a winner from this seat without actually running it yet. It is certainly enough to make it over the hump and tailor it until it works.
Thank you so much.