Reading/Writing Custom EXIF tags w/o config file

Started by benvolio, May 24, 2020, 11:45:42 AM

Previous topic - Next topic

benvolio

I want to add UserDefined tags to a lot of JPEG files but would rather not carry the extra baggage of all the accompanying config files. My question is: Once I add the custom tags, can I delete the config file while still being able to access the tags? (In the exerpts below, the tag name "Month" is only accessible in the config file, while the accompanying value "May" is now written to APP1. Is there someway to have the tag, "Month", appear alongside the value, "May".)

Config file:
%Image::ExifTool::UserDefined = (
   # All EXIF tags are added to the Main table, and WriteGroup is used to
   # specify where the tag is written (default is ExifIFD if not specified):
   'Image::ExifTool::Exif::Main' => {
     # Example 1.  EXIF:NewEXIFTag
     # 0xd000 =>
     #    Name => 'NewEXIFTag',
     #    Writable => 'int16u',
     #    WriteGroup => 'IFD0',
     # },
     # add more user-defined EXIF tags here...

        0xd001 => {
          Name => 'Month',
          Writable => 'string',
          WriteGroup => 'IFD0',
        },
    },
);


Command Prompt call of "exiftool -v1 [image_file.jpg]":
| 4)  Exif_0xd001 = May

Thank you, in advance, for your help!

StarGeek

#1
Without the config file, exiftool will not display your custom tag without the -u option.  Even then, it will not display the name because EXIF tags do not have the name embedded in the file.  For example:
Exif_0xd001                     : may

I would suggest creating an XMP tag instead.  Exiftool will extract XMP tags it doesn't know with the name, though it will not be able to edit or copy without the config file.

I copy/pasted/edited this simple tag definition with this resulting config
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::xmp' => {
        # Month tag (simple string, no checking)
        Month => { },
    },
);
1;


And example writing with config and then reading without config.
C:\>exiftool -config xx.txt -P -overwrite_original -month=may y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -g1 -a -s -month y:\!temp\Test4.jpg
---- XMP-xmp ----
Month                           : may
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

benvolio