-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I'm using the latest version (from NPM) of the C2PA JavaScript library in a small project. I tried to check the CAI data for a PNG file created by ChatGPT and get the error message in the title. Call stack shows
PtcAIService.ts:170 Error reading image: C2pa(ClaimDecoding): claim could not be converted from CBOR
at imports.wbg.__wbg_new_28c511d9baebfa89 (blob:http://localhost:3000/7717c283-dbe9-443a-8fb4-7a081b2d4f29:877:25)
at wasm://wasm/00f9d982:wasm-function[954]:0x2ba232
at wasm://wasm/00f9d982:wasm-function[109]:0x4605b
at wasm://wasm/00f9d982:wasm-function[1642]:0x3152a4
at wasm://wasm/00f9d982:wasm-function[4179]:0x378dd3
at wasm://wasm/00f9d982:wasm-function[4178]:0x378dc5
at __wbg_adapter_42 (blob:http://localhost:3000/7717c283-dbe9-443a-8fb4-7a081b2d4f29:656:14)
at real (blob:http://localhost:3000/7717c283-dbe9-443a-8fb4-7a081b2d4f29:641:24)
I use Google Chrome on Windows.
I then tried the copy of the c2patool.exe I've had (on Windows) with the image and it produced the similar error "Error: claim could not be converted from CBOR".
I updated the c2patool.exe to the latest version available here on GitHub (from May 2025) and this fixed the problem. I now can see the CAI data in the ChatGPT PNG file.
I wonder if there is something missing or outdated in the official JavaScript package that has been fixed in the c2patool?
I have attached the ChatGPT created image that produces the error.