Should RegionType be a list?

Started by Algae, November 29, 2013, 04:08:22 PM

Previous topic - Next topic

Algae

I expected RegionType and RegionName to behave the same, they do not. I use Picasa to tag people in my photos and it adds values to both of these tags. Unfortunately I sometimes edit the photos and the tags are lost. I hoped to solve this by saving the tags to csv before editing then restoring them. This works fine for all the Region tags except RegionType

Following is an annoted script illustrating the problem:

K:\Test>exiftool -ver    // confirm exiftool version
9.41

K:\Test>exiftool -regionname= -regiontype= Test.jpg  // clear the tags
    1 image files updated

K:\Test>exiftool -regionname -regiontype -f Test.jpg  // display tag calues
Regionname                      : -
Regiontype                      : -

K:\Test>exiftool -regionname=Name1,Name2 -regiontype=Face,Face Test.jpg  // try to set the tags
Warning: Can't convert XMP-mwg-rs:RegionType (not in PrintConv)
    1 image files updated

K:\Test>exiftool -regionname -regiontype -f Test.jpg   // RegionName is set as expected, RegionType is not
Region Name                     : Name1,Name2
Regiontype                      : -

K:\Test>exiftool -regiontype+=Face Test.jpg  // use += format for RegionType
    1 image files updated

K:\Test>exiftool -regionname -regiontype -f Test.jpg
Region Name                     : Name1,Name2
Region Type                     : Face

K:\Test>exiftool -regiontype+=Face Test.jpg  // use += format for RegionType
    1 image files updated

K:\Test>exiftool -regionname -regiontype -f Test.jpg  // it works but not convenient for a large number of images
Region Name                     : Name1,Name2
Region Type                     : Face, Face

Phil Harvey

I think that if you read (and understand) FAQ number 17, then all of your questions should be answered.  This will also solve a problem with RegionName that you didn't know you had.

- Phil
...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 ($).

Algae

Thanks for the quick response. Perhaps -sep ", " should be the default?

I was  doing this

exiftool -csv *.jpg > exif.csv // save tags

exiftool -csv=exif.csv // to reload tags

I didn't specify -sep when writing to CSV and didn't expect to have to specify it when reading from the created CSV.

Anyway I'm good with adding -sep ", " it's simple enough.


Phil Harvey

In your example, you would need -sep "," (no space).

I agree that it may have made sense to have -sep ", " as the default when writing, but it is too late to change it now.

- Phil
...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 ($).