Closed eeeps closed 11 months ago
So apparently, there is! However it is currently undocumented.
Thanks to @gpeacock in the Discord for showing me the way; it currently works by sticking the instance_id
from the ingredient report JSON into a field called instanceId
on the action
. e.g.:
"assertions": [
{
"label": "c2pa.actions",
"data": {
"actions": [
{
"action": "c2pa.resized",
"when": "2023-07-20T15:57:41-0700",
"instanceId": "xmp:iid:8dab8f63-ab54-4381-9c54-01dcd48c1255"
}
]
}
}
]
This should result in a v1-style ingredient parameter on the action:
"assertions": [
{
"label": "c2pa.actions",
"data": {
"actions": [
{
"action": "c2pa.resized",
"instanceId": "xmp:iid:8dab8f63-ab54-4381-9c54-01dcd48c1255",
"parameters": {
"ingredient": {
"hash": "A+c+6tBgK3YeN9njQsYdcn1Mv1A2iFBPA9LNMjo7SqU=",
"url": "self#jumbf=c2pa.assertions/c2pa.ingredient"
}
},
"when": "2023-07-20T15:57:41-0700"
}
]
}
}
]
According to the C2PA spec:
In addition, the presence of the ingredients field in the parameters object seems to allow for specific actions to only apply to specific ingredients, in cases where there are multiple ingredients.
Right now c2patool seems to pass through any JSON I put in
assertions[i].data.actions[i].parameters.ingredients
unmodified. But I can't know the hashed JUMBF URI of the ingredient, which I am adding with c2patool at the same time that I am adding the action.