Cant' change subject location

Started by voland, October 05, 2014, 09:47:43 AM

Previous topic - Next topic

voland

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?

Phil Harvey

#1
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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

voland

OK, but then it looks like IPTC is the place to go. Thanks!