Skip to content

Commit 6fc1204

Browse files
authored
Update README (#215)
Update README c2pa 1.2 add file formats section adds a Release Notes section adds x-adobe-dng to supported mime types CI docs, add --no-deps flag Don't serialize null title.
1 parent 2eb9708 commit 6fc1204

File tree

5 files changed

+47
-15
lines changed

5 files changed

+47
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
# environment. The goal is to fail PR validation
162162
# if the subsequent release would result in a failed
163163
# documentation build on docs.rs.
164-
run: cargo +nightly doc --all-features
164+
run: cargo +nightly doc --all-features --no-deps
165165
env:
166166
RUSTDOCFLAGS: --cfg docsrs
167167
DOCS_RS: 1

README.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,18 @@ The **[Coalition for Content Provenance and Authenticity](https://c2pa.org)** (C
66

77
## Key features
88

9-
The C2PA Rust SDK implements a subset of the [C2PA 1.0 technical specification](https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html).
9+
The C2PA Rust SDK implements a subset of the [C2PA 1.2 technical specification](https://c2pa.org/specifications/specifications/1.2/specs/C2PA_Specification.html).
1010

1111
The SDK enables a desktop, mobile, or embedded application to:
12-
* Create and sign C2PA [claims](https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_claims) and [manifests](https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_manifests).
12+
* Create and sign C2PA [claims](https://c2pa.org/specifications/specifications/1.2/specs/C2PA_Specification.html#_claims) and [manifests](https://c2pa.org/specifications/specifications/1.2/specs/C2PA_Specification.html#_manifests).
1313
* Embed manifests in certain file formats.
1414
* Parse and validate manifests found in certain file formats.
1515

16-
The SDK supports several common C2PA [assertions](https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_c2pa_standard_assertions) and [hard bindings](https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_hard_bindings).
16+
The SDK supports several common C2PA [assertions](https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_c2pa_standard_assertions) and [hard bindings](https://c2pa.org/specifications/specifications/1.2/specs/C2PA_Specification.html#_hard_bindings).
1717

1818
## State of the project
1919

20-
This is an early release (version 0.x.x) of the project. The minor version number (0.x.0) is incremented when there are breaking API changes, which may happen frequently.
21-
22-
The SDK:
23-
* Supports a variety of image and video formats. For details, see [c2patool supported file formats](https://opensource.contentauthenticity.org/docs/c2patool/#supported-file-formats).
24-
* Does not parse identity structures (verifiable credentials).
20+
This is a beta release (version 0.x.x) of the project. The minor version number (0.x.0) is incremented when there are breaking API changes, which may happen frequently.
2521

2622
### Contributions and feedback
2723

@@ -38,8 +34,27 @@ The SDK has been tested on the following operating systems:
3834
* Windows
3935
* MacOS (Intel and Apple silicon)
4036
* Ubuntu Linux
41-
* WebAssembly (Wasm); NOTE: claim _generation_ is not available on Wasm.
42-
37+
* WebAssembly (Wasm)
38+
39+
## Supported file formats
40+
41+
| Extensions | MIME type |
42+
|---------------| --------------------------------------------------- |
43+
| `avi` | `video/msvideo`, `video/avi`, `application-msvideo` |
44+
| `avif` | `image/avif` |
45+
| `c2pa` | `application/x-c2pa-manifest-store`, |
46+
| `dng` | `image/x-adobe-dng` |
47+
| `heic` | `image/heic` |
48+
| `heif` | `image/heif` |
49+
| `jpg`, `jpeg` | `image/jpeg` |
50+
| `m4a` | `audio/mp4` |
51+
| `mp4` | `video/mp4`, `application/mp4` |
52+
| `mov` | `video/quicktime` |
53+
| `png` | `image/png` |
54+
| `tif`,`tiff` | `image/tiff` |
55+
| `wav` | `audio/x-wav` |
56+
| `webp` | `image/webp` |
57+
4358
## Usage
4459

4560
Add this to your `Cargo.toml`:
@@ -51,7 +66,7 @@ c2pa = "0.19.0"
5166

5267
If you want to read or write a manifest file, add the `file_io` dependency to your `Cargo.toml`. For example:
5368
```
54-
c2pa = { version = "0.11.0", features = ["file_io"] }
69+
c2pa = { version = "0.19.0", features = ["file_io"] }
5570
```
5671

5772
NOTE: If you are building for WASM, omit the `file_io` dependency.
@@ -71,3 +86,19 @@ The Rust SDK crate provides:
7186
The `c2pa` crate is distributed under the terms of both the [MIT license](https://github.com/contentauth/c2pa-rs/blob/main/LICENSE-MIT) and the [Apache License (Version 2.0)](https://github.com/contentauth/c2pa-rs/blob/main/LICENSE-APACHE).
7287

7388
Note that some components and dependent crates are licensed under different terms; please check the license terms for each crate and component for details.
89+
90+
## Release Notes
91+
92+
This section gives a highlight of noteworthy changes
93+
94+
Refer to the [CHANGELOG](CHANGELOG.md) for detailed Git changes
95+
96+
## 0.19.0
97+
_23 March 2023_
98+
99+
* Added support for many new file formats, see Supported File Formats above.
100+
* New api to return supported formats.
101+
* Streaming APIs for manifest creation without file_io for some formats.
102+
* Manifest and Ingredient JSON formats replace the `is_parent` field with `relationship`.
103+
* ResourceRef replaces `content-type` with `format`.
104+
* The `bmff` feature no longer required.

sdk/src/assertions/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! Assertion helpers to build, validate, and parse assertions.
1515
1616
mod actions;
17-
pub use actions::*;
17+
pub use actions::{c2pa_action, Action, Actions};
1818

1919
mod bmff_hash;
2020
pub use bmff_hash::{BmffHash, DataMap, ExclusionsMap, SubsetMap};
@@ -36,7 +36,7 @@ pub(crate) use ingredient::{Ingredient, Relationship};
3636
pub mod labels;
3737

3838
mod metadata;
39-
pub use metadata::{Actor, DataSource, Metadata, ReviewRating, *};
39+
pub use metadata::{c2pa_source, Actor, DataSource, Metadata, ReviewCode, ReviewRating};
4040

4141
mod schema_org;
4242
pub use schema_org::{SchemaDotOrg, SchemaDotOrgPerson};

sdk/src/asset_handlers/tiff_io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const TILEOFFSETS: u16 = 324;
4949

5050
const SUBFILES: [u16; 3] = [SUBFILE_TAG, EXIFIFD_TAG, GPSIFD_TAG];
5151

52-
static SUPPORTED_TYPES: [&str; 4] = ["dng", "tif", "tiff", "image/tiff"];
52+
static SUPPORTED_TYPES: [&str; 5] = ["tif", "tiff", "image/tiff", "dng", "image/x-adobe-dng"];
5353

5454
// The type of an IFD entry
5555
enum IFDEntryType {

sdk/src/manifest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub struct Manifest {
4949
pub claim_generator: String,
5050

5151
/// A human-readable title, generally source filename.
52+
#[serde(skip_serializing_if = "Option::is_none")]
5253
title: Option<String>,
5354

5455
/// The format of the source file as a MIME type.

0 commit comments

Comments
 (0)