ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ericconn on July 12, 2023, 03:51:48 PM

Title: Attribute for the size of just the image part of a JPG file?
Post by: ericconn on July 12, 2023, 03:51:48 PM
I am trying to sort through a large amount of duplicate files, lots of which are one original version and another that's been edited. I'm trying to sort through these with exiftool, but just looking at the different attributes that are edited is difficult. Is there an attribute that is just the size of the image part of the file and not the tags/edits/etc? Thanks.
Title: Re: Attribute for the size of just the image part of a JPG file?
Post by: StarGeek on July 12, 2023, 04:02:12 PM
Do you mean the how many bytes the image data has or the image dimensions?  There nothing to find how many bytes are in the image data, but you can use the ImageDataHash to create an MD5 hash of the data.  If the actual image data has been changed in anyway, the hashes won't match.

But if you're looking for duplicates, I'd suggest using a program designed to find duplicate images. DupeGuru (https://dupeguru.voltaicideas.net/) and Czkawka (https://github.com/qarmin/czkawka) are both very good programs for finding exact duplicates as well as images which are similar, but not exact duplicates.
Title: Re: Attribute for the size of just the image part of a JPG file?
Post by: ericconn on July 12, 2023, 05:44:21 PM
Thanks for your quick response. I'm looking for the size in bytes of the image data. Trying ImageDataHash, I'm getting a null result on Windows:

exiftool -ImageDataHash -csv "source" > "destination.csv"

I use a program called Duplicate Cleaner which is quite helpful, but it doesn't tell me if the image is the original or a derivative exported version, or if the images are the same image but the tags are different.
Title: Re: Attribute for the size of just the image part of a JPG file?
Post by: StarGeek on July 12, 2023, 05:58:03 PM
Quote from: ericconn on July 12, 2023, 05:44:21 PMTrying ImageDataHash, I'm getting a null result on Windows:

It's a recent addition, added just last month.  You need version exiftool 12.63+