ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: tlum on December 16, 2018, 11:26:14 AM

Title: Generating MD5 Hash over image data?
Post by: tlum on December 16, 2018, 11:26:14 AM
I'm wondering if there is an easy way to generate an MD5 Hash over a files image data? Don't confuse file data with image data, files are containers. I've already generated MD5 Hashes on the files, that's easy enough with md5sum.

The problem is the image data may be identical while the containers metadata may have been altered after a duplication has occurred. For my purposes only the main image data is relevant. While it would be great if exiftool could spit out an MD5 Hash of the image data, it would be sufficient to be able to stream the image data to stdout. I'm not sure if any of this is possible at present.

TIA!
Title: Re: Generating MD5 Hash over image data?
Post by: Phil Harvey on December 16, 2018, 11:38:46 AM
For JPEG images this may be done by stripping all metadata, ie)

exiftool a.jpg -all= -o - | md5

But this won't work for other formats.  ExifTool doesn't deal with image data per se, so it won't do exactly what you are asking.

- Phil
Title: Re: Generating MD5 Hash over image data?
Post by: tlum on December 20, 2018, 07:36:23 PM
Thanks, I try tools which are geared more towards reading the image streams than the container metadata.