ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: gEEvEE on November 15, 2022, 11:42:42 AM

Title: Image region description different with and without -struct
Post by: gEEvEE on November 15, 2022, 11:42:42 AM
Dear all,
I am delving into IPTC image regions using the IPTC test image "Stalactite and stalagmite in cave" (https://www.iptc.org/std/photometadata/examples/image-region-examples/ (https://www.iptc.org/std/photometadata/examples/image-region-examples/)).

In the attached screenshot, one sees that without the -struct options, Exiftool reports one image region description in an XMP-iptcExt field (although there are two regions), and one description in the XMP-dc field.

Using the -struct option, there are now two descriptions (one of them is nowhere to be found in the none -struct option). These descriptions also are said to come from the from the XMP-dc field (although the none -struct output only gave one description, which was also different).

What is going on here? How come that one output gives more descriptions than another?
Thanks for any insight! Geert
Title: Re: Image region description different with and without -struct
Post by: Phil Harvey on November 15, 2022, 02:07:36 PM
Add the -a option to your command to allow duplicate tags to be shown (FAQ 3 (https://exiftool.org/faq.html#Q3)).

- Phil
Title: Re: Image region description different with and without -struct
Post by: gEEvEE on November 15, 2022, 04:15:35 PM
Oh, that was stupid of me. Thanks so much Phil!
Title: Re: Image region description different with and without -struct
Post by: gEEvEE on November 15, 2022, 05:00:57 PM
And I have one more question if I may. When writing the -ImageRegionDescription="blablabla" tag to a file, Exiftool tells me that 'ImageRegionDescription' is not defined (although it reads this tag from the IPTC example file. Cheers! Geert
Title: Re: Image region description different with and without -struct
Post by: Phil Harvey on November 15, 2022, 05:34:12 PM
See the description of the ImageRegion structure (https://exiftool.org/TagNames/XMP.html#ImageRegion) in the tag name documentation.

- Phil
Title: Re: Image region description different with and without -struct
Post by: gEEvEE on November 15, 2022, 06:27:41 PM
Hi Phil, I did but I do not see anywhere the "description" field name. When I check the structured output of the IPTC image, I see all 5 field names (Name, RegionBoundary,RCtype, RId, RRole) and I see that Exiftool also provides a 6th one: XMP-dc:Description.
Writing the description of the region works when I format the command as a structure exiftool -xmp:imageregion={Name="The name of the region",XMP-dc:Description="This is a test"} filename but I seem incapable of writing that description using a non-structured approach.
When I write the description as exiftool -ImageRegionName="The name of the region" -XMP-dc:description="This is a test" filename, the description logically ends up as an [XMP:XMP-dc] field and not as [XMP:XMP-iptcExt] field.

Maybe I should just use the structured approach. Thanks.
Title: Re: Image region description different with and without -struct
Post by: Phil Harvey on November 15, 2022, 09:36:06 PM
I thought the documentation was clear enough...

[...] this structure may contain any top-level XMP tags, but since they aren't pre-defined the only way to add these tags is to write ImageRegion as a structure with these tags as new fields.

So yes, you must use the structured approach to write any of the top-level XMP tags (like the XMP-dc tags) in this structure.

- Phil
Title: Re: Image region description different with and without -struct
Post by: gEEvEE on November 16, 2022, 05:29:41 AM
Dear Phil, yes, in hindsight the documentation is clear enough. I think I just got lost in too much info. Thanks a lot for your help and everything you enable via ExifTool! Best, Geert