XMP Colorant Namespace

Started by blue-j, December 04, 2021, 03:08:38 PM

Previous topic - Next topic

blue-j

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

Phil Harvey

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

blue-j

Are we using the xmpG family name?  That's all I meant.  : )

J

StarGeek

#3
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.

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
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

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

blue-j

Thank you both for your kind patience and for educating me!  : )    - J