Skip to content

history manifest is overwritten #196

Description

@ttbuffey

https://contentauth.github.io/example-assets/images/ChatGPT_Image.png

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?

Activity

  1. tmathern commented on Nov 26, 2025

    @tmathern
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions