ExifTool Forum

ExifTool => Newbies => Topic started by: mpena on October 18, 2020, 11:32:24 AM

Title: Difference between two images
Post by: mpena on October 18, 2020, 11:32:24 AM
I am trying to load my own photos into Pigallery2 and get it to recognize my face regions.

I have now downloaded the example photo and modified it by setting a region value (same value):

exiftool '-RegionAreaH=0.55270' IMG_6253.jpg

But as soon as I modify any tag, it seems that Pigallery2 does not recognize the face region anymore. I tried diffing the exiftool output:

$ diff non-working.txt working.txt
144,147c144,147
< [System]        FileAccessDate                  : 2020:10:18 17:10:45+02:00
< [System]        FileInodeChangeDate             : 2020:10:18 17:14:04+02:00
< [System]        FileModifyDate                  : 2020:10:18 17:10:23+02:00
< [System]        FileName                        : IMG_6253_not-working.jpg
---
> [System]        FileAccessDate                  : 2020:10:18 17:09:17+02:00
> [System]        FileInodeChangeDate             : 2020:10:18 17:08:09+02:00
> [System]        FileModifyDate                  : 2020:10:18 17:08:09+02:00
> [System]        FileName                        : IMG_6253_working.jpg
149c149
< [System]        FileSize                        : 889 kB
---
> [System]        FileSize                        : 884 kB

It seems that exiftool increases the filesize by 5 kB?

I attached both files. Can anyone help me find the difference in these two photos?
Title: Re: Difference between two images
Post by: StarGeek on October 18, 2020, 12:06:39 PM
Quote from: mpena on October 18, 2020, 11:32:24 AM
I am trying to load my own photos into Pigallery2 and get it to recognize my face regions.

A web gallery that actually reads regions?  Very cool.  I gave up looking for such a beast a long time ago.

QuoteBut as soon as I modify any tag, it seems that Pigallery2 does not recognize the face region anymore.

I'd suggest adding the modified file to a new instance of the gallery that doesn't have the original in it, just in case it's reading some of the embedded document IDs and thinking it's the same image or something.  A long shot, but worth trying.

QuoteIt seems that exiftool increases the filesize by 5 kB?

The data appears to be the same for the most part, though I didn't check line by line.  But looking at the raw XMP shows a difference.  The original is using the shorthand way of writing the XMP while the modified is written the more longhand version, which accounts for the increase in size.  So it's very odd that the longer version isn't being read correctly, since that is usually more compatible with most programs.

Try testing out some of the -api Compact settings (https://exiftool.org/ExifTool.html#Compact) to see if that helps.  I'd start with -api Compact=Shorthand when you edit the data.
Title: Re: Difference between two images
Post by: mpena on October 18, 2020, 03:01:53 PM
Thanks for the reply and confirming that everything should be the same. I just tried with Compact Shorthand and All, which both didn't seem to make a difference. May I ask how you checked the raw values (I only know -X)?
Title: Re: Difference between two images
Post by: StarGeek on October 18, 2020, 06:29:39 PM
To see the raw XMP, use
exiftool -b -XMP /path/to/file/