How to force ExifTool to generate ImageDataHash tag by default?

Started by CWCorrea, February 23, 2024, 10:36:03 PM

Previous topic - Next topic

CWCorrea

Per the Extra Tags documentation, I understand that the ImageDataHash tag is generated only if specifically requested, but I would like ExifTool to generate it when running something like:

exiftool -a -U -s -G1 -struct -api RequestAll=3 image.jpg

Is there a way to force ExifTool to generate the ImageDataHash tag by default? Right now I'm not concerned about performance issues.

Thanks!

PS. Running ExifTool 12.77 on macOS 12.6.3

StarGeek

You would look to the %Image::ExifTool::UserDefined::Options section of the example.config file.

You could either set the RequestAll option as shown in the example, or you could use the RequestTags option to only ask for the ImageDataHash

I think this is what you would want, but I haven't tested it
%Image::ExifTool::UserDefined::Options = (
    RequestTags=> 'ImageDataHash',
);
* 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).

CWCorrea

Thank you StarGeek. This is exactly what I was looking for.

Christian W.