Skip to content

Commit 44a5dd5

Browse files
authored
Update manifest-tasks.mdx
Add cpp.
1 parent c66b543 commit 44a5dd5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/manifest/manifest-tasks.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,23 @@ await read('my-c2pa-file.jpg', 'image/jpeg');
106106
</TabItem>
107107
108108
<TabItem value="cpp" label="C++">
109-
This is how to read a manifest using C++.
109+
Use the `read_file` function to read C2PA data from the specified file. This function examines the specified asset file for C2PA data and its return value is a JSON report if it finds C2PA data. If there are validation errors, the report includes a `validation_status` field. Exceptions are thrown on errors.
110+
111+
```cpp
112+
auto json_store = C2pa::read_file("<ASSET_FILE>", "<DATA_DIR>")
113+
```
114+
115+
Where:
116+
117+
- `<ASSET_FILE>`- The asset file to read; The file must be one of the [supported file formats](#supported-file-formats).
118+
- `<DATA_DIR>` - Optional path to data output directory; If provided, the function extracts any binary resources, such as thumbnails, icons, and C2PA data into that directory. These files are referenced by the identifier fields in the manifest store report.
119+
120+
For example:
121+
122+
```cpp
123+
auto json_store = C2pa::read_file("work/media_file.jpg", "output/data_dir")
124+
```
125+
110126
</TabItem>
111127
112128
</Tabs>

0 commit comments

Comments
 (0)