ExifTool Forum

General => Metadata => Topic started by: blue-j on December 04, 2021, 03:08:38 PM

Title: XMP Colorant Namespace
Post by: blue-j on December 04, 2021, 03:08:38 PM
Looks to me like Exiftool needs to add xmpG here and perhaps trap for the permitted ranges?

https://exiftool.org/TagNames/XMP.html#Colorant

https://wwwimages2.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2016-08/XMPSpecificationPart2.pdf

1.2.2.1 Colorant
A structure containing the characteristics of a colorant (swatch) used in a document.
 The field namespace URI is http://ns.adobe.com/xap/1.0/g/
 The preferred field namespace prefix is xmpG

Name Type Description
xmpG:A
xmpG:B
Integer A or B value when the mode is LAB. Range -128 to 127.

xmpG:L Real L value when the mode is LAB. Range 0-100.

xmpG:black
xmpG:cyan
xmpG:magenta
xmpG:yellow
Real Colour value when the mode is CMYK. Range 0-100.

xmpG:blue
xmpG:green
xmpG:red
Integer Colour value when the mode is RGB. Range 0-255.

xmpG:mode closed Choice The colour space in which the colour is defined. One of: CMYK,
RGB, LAB. Library colours are represented in the colour
space for which they are defined.

xmpG:swatchName Text Name of the swatch.

xmpG:type closed Choice The type of colour, one of PROCESS or SPOT
Title: Re: XMP Colorant Namespace
Post by: Phil Harvey on December 06, 2021, 09:00:42 AM
I'm not sure what you are suggesting here.

ExifTool already implements this.

The only thing it isn't doing is range-checking the values.

- Phil
Title: Re: XMP Colorant Namespace
Post by: blue-j on December 06, 2021, 08:04:41 PM
Are we using the xmpG family name?  That's all I meant.  : )

J
Title: Re: XMP Colorant Namespace
Post by: StarGeek on December 07, 2021, 12:33:55 AM
I could be wrong but here is my understanding.

The link you give to Colorant is a structure definition.  These are not tags by themself.  It is used as parts of other tags.  Looking down the list, it's used in XMP-xmpDM:VideoAlphaPremultipleColor, XMP-xmpTPg:Colorants, and as a sub-structure to XMP-xmpTPg:SwatchGroups, i.e. the Colorant Struct is part of the SwatchGroup Struct (https://exiftool.org/TagNames/XMP.html#SwatchGroup).

So by itself, it doesn't have a family name.

If you look at the raw XMP, you will see your XmpG.  Use this command
exiftool -VideoAlphaPremultipleColorA=1 -ColorantA=1 -SwatchColorantA=1 file.jpg
and then look at the raw XMP
exiftool -xmp -b file.jpg

Edit: fixed command
Title: Re: XMP Colorant Namespace
Post by: Phil Harvey on December 07, 2021, 08:25:31 AM
Exactly.
Title: Re: XMP Colorant Namespace
Post by: blue-j on December 07, 2021, 12:39:46 PM
Thank you both for your kind patience and for educating me!  : )    - J