ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: voland on October 05, 2014, 09:47:43 AM

Title: Cant' change subject location
Post by: voland on October 05, 2014, 09:47:43 AM
Hi,

I'm trying to change an existing subject location in ExifIFD. I can read the current value:

> exiftool -ExifIFD:SubjectLocation test.jpg
Subject Location                : Old Location

But I get an error when I tried to change the value.

> exiftool -overwrite_original_in_place -ExifIFD:SubjectLocation='New Location' test.jpg
Warning: Too many values specified (2 required) for ExifIFD:SubjectLocation
Nothing to do.

I'm using v 9.72 on Mac. Any ideas?
Title: Re: Cant' change subject location
Post by: Phil Harvey on October 05, 2014, 09:53:03 AM
Yes.  The Exif specification states that SubjectLocation is used to store 2 integer numbers representing the pixel position of the subject. 

If you want to store geographic location, you should probably use IPTC or the new XMP-iptcCore/XMP-iptcExt tags.

- Phil

Edit: Also, I don't understand why you don't get a "Not an integer" warning if your string has 2 words:

> exiftool -subjectlocation="New Location" a.jpg
Warning: Not an integer for ExifIFD:SubjectLocation
Nothing to do.
> exiftool -subjectlocation="More than two words" a.jpg
Warning: Too many values specified (2 required) for ExifIFD:SubjectLocation
Nothing to do.
> exiftool -subjectlocation="OnlyOneWord" a.jpg
Warning: Not enough values specified (2 required) for ExifIFD:SubjectLocation
Nothing to do.
> exiftool -subjectlocation="200 300" a.jpg
    1 image files updated
Title: Re: Cant' change subject location
Post by: voland on October 06, 2014, 03:16:15 AM
OK, but then it looks like IPTC is the place to go. Thanks!