contentauth/c2pa-python

Sidecar Prop Option

Closed this issue · 3 comments

oconpa commented

Could we add the ability for the python sdk to not embed into the image but rather output the JUMPBF as a sidecar for the sign_file sdk?

original

result = c2pa.sign_file("path/to/source.jpg", "path/to/dest.jpg, manifest_json, sign_info, data_dir)

proposed

result = c2pa.sign_file("path/to/source.jpg", "path/to/dest.jpg, manifest_json, sign_info, data_dir, sidecar=Boolean)

It defaults to false and embeds, however if specified it will output a sidecar with the file name however extension is .c2pa

oconpa commented

In similar fashion to how the CLI does it with the -s flag https://github.com/contentauth/c2patool?tab=readme-ov-file#usage

I need to add the remote_url and no_embed options to the new Builder API. I'll do that once the rust api is updated.

Remote url and no_embed methods are now included in builder that allow this functionality. You can also validate a sidecar image with an optional manifest_data parameter on the Reader constructor.