Skip to content
Open

(WIP) #294

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def read_c2pa_data(media_path: str):
# All objects using this context will have trust configured.
with c2pa.Context(settings) as context:
with c2pa.Reader(media_path, context=context) as reader:
print(reader.detailed_json())
print(reader.crjson())
except Exception as e:
print(f"Error reading C2PA data from {media_path}: {e}")
sys.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion examples/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ def callback_signer_es256(data: bytes) -> bytes:
# The validation state will depend on loaded trust settings.
# Without loaded trust settings,
# the manifest validation_state will be "Invalid".
print(reader.json())
print(reader.crjson())

print("\nExample completed successfully!")
4 changes: 2 additions & 2 deletions examples/sign_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
print("\nReading existing C2PA metadata:")
with open(fixtures_dir + "C.jpg", "rb") as file:
with c2pa.Reader("image/jpeg", file) as reader:
print(reader.json())
print(reader.crjson())

# Create a signer from certificate and key files
with open(fixtures_dir + "es256_certs.pem", "rb") as cert_file:
Expand Down Expand Up @@ -103,7 +103,7 @@
# The validation state will depend on loaded trust settings.
# Without loaded trust settings,
# the manifest validation_state will be "Invalid".
print(reader.json())
print(reader.crjson())

print("\nExample completed successfully!")

Loading
Loading