You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to embed a new c2pa manifest file on the above image which already has a c2pa manifest file attached, the history are overwritten when I read the manifest info.
before each embed, should I read and append a new manifest as the active manifest? how does it usually works?
before each embed, should I read and append a new manifest as the active manifest roughly, yes, but it's a little more involved than just reading and appending because you need to handle the asset you opened as an ingredient (even, and especially if you re-sign the same asset). You need, when you create a new manifest, in your case, to add an opened action to your manifest, with the existing asset as ingredient on that action.
The way it should work, is that you would create a new manifest and use the original asset as ingredient (the SDK will keep the ingredient's manifest, and you will see a graph of manifests appear in the manifest store).
For your use case, I think the right approach is to create a manifest with the opened action, and the image you are opening as ingredient (this is per spec, open needs an ingredient). The ingredient needs to have the parentOf relationship. This will conserve the image's existing manifest (but not as active manifest, the manifest from the image you opened is becoming an ingredient, and whatever manifest you will add/modify/sign will become the new active manifest).
Either a c2pa.created or a c2pa.opened is now mandatory in a standard manifest
For c2pa.opened: Check that the ingredients field (or ingredient field for c2pa.actions) contains exactly one valid hashed URI that can be resolved to an ingredient assertion in the current manifest whose relationship field is parentOf
ps: We are working on APIs that make that ingredient handling easier, but they are not released yet. The API in question would be set_intent, on the Builder, with EDIT as intent. The example from the unit tests in the unreleased vNext branch is here.
Activity
tmathern commentedon Nov 26, 2025
before each embed, should I read and append a new manifest as the active manifestroughly, yes, but it's a little more involved than just reading and appending because you need to handle the asset you opened as an ingredient (even, and especially if you re-sign the same asset). You need, when you create a new manifest, in your case, to add an opened action to your manifest, with the existing asset as ingredient on that action.The way it should work, is that you would create a new manifest and use the original asset as ingredient (the SDK will keep the ingredient's manifest, and you will see a graph of manifests appear in the manifest store).
For your use case, I think the right approach is to create a manifest with the opened action, and the image you are opening as ingredient (this is per spec, open needs an ingredient). The ingredient needs to have the parentOf relationship. This will conserve the image's existing manifest (but not as active manifest, the manifest from the image you opened is becoming an ingredient, and whatever manifest you will add/modify/sign will become the new active manifest).
ps: We are working on APIs that make that ingredient handling easier, but they are not released yet. The API in question would be set_intent, on the Builder, with EDIT as intent. The example from the unit tests in the unreleased vNext branch is here.