ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: CWCorrea on February 23, 2024, 10:36:03 PM

Title: How to force ExifTool to generate ImageDataHash tag by default?
Post by: CWCorrea on February 23, 2024, 10:36:03 PM
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
Title: Re: How to force ExifTool to generate ImageDataHash tag by default?
Post by: StarGeek on February 23, 2024, 10:58:25 PM
You would look to the %Image::ExifTool::UserDefined::Options section of the example.config file (https://exiftool.org/config.html).

You could either set the RequestAll option (https://exiftool.org/ExifTool.html#RequestAll) as shown in the example, or you could use the RequestTags option (https://exiftool.org/ExifTool.html#RequestTags) 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',
);
Title: Re: How to force ExifTool to generate ImageDataHash tag by default?
Post by: CWCorrea on February 23, 2024, 11:04:51 PM
Thank you StarGeek. This is exactly what I was looking for.

Christian W.