c2pa-rs icon indicating copy to clipboard operation
c2pa-rs copied to clipboard

C2patool 0.19.1 does not take the XMP InstanceId as the instance_id in the generated manifest

Open weihuaqd opened this issue 6 months ago • 3 comments

Here are the steps to reproduce:

  1. download your sample image file C.jpg
  2. use exiftool to insert XMP metadata into a new file C-with-id2.jpg. The resulting file has the following XMP Ids: Document ID : 11111111-0000-0000-0000-000000000000 Instance ID : 22222222-0000-0000-0000-000000000000
  3. run the following command: c2patool -m manifest.json C.jpg -o C-with-id2.jpg -f
  4. the active manifest has the following: "title": "C-with-id2.jpg", "format": "image/jpeg", "instance_id": "xmp:iid:72f0b725-7e57-4617-951b-4b4258ea11c2",

As you can see, the instance_id was generated dynamically, not from the XMP data. Note: This behavior is different from 0.9.12.

  1. run exiftool to check XMP Ids in C-with-id2.jpg. The XMP Ids are gone.

weihuaqd avatar Aug 18 '25 20:08 weihuaqd

the output xmp can not be the same

llangsner avatar Sep 04 '25 21:09 llangsner

It's true that this is a change in behavior. We used to use take the instanceId from the source file's XMP instanceID. With XMP, we should be changing the instanceID in XMP whenever we significantly modify the file. So there are times when t may be correct to generate a new instanceID. But since c2patool only modifies XMP and c2padata, it sounds like it is a case where we don't need to change the instanceID and can preserve it.

gpeacock avatar Dec 18 '25 07:12 gpeacock

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/CAI-10499 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Dec 18 '25 07:12 github-jira-sync-bot