contentauth / c2pa-python

Python binding for c2pa-rs library
Apache License 2.0
23 stars 7 forks source link

Parents (ingredients) intake to sign from pre-existing Manifests #12

Open oconpa opened 7 months ago

oconpa commented 7 months ago

Can we add functionality to the sign_file sdk to extend a pre-existing Manifest incorporating it as a parent.

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, ingredients=[Manifests])

This way we can include the parents that formed the child asset

oconpa commented 7 months ago

The CLI aligns with this feature partially allowing one parent https://github.com/contentauth/c2patool?tab=readme-ov-file#usage