|
| 1 | +--- |
| 2 | +id: legacy-manifests |
| 3 | +title: Reading legacy manifest data |
| 4 | +--- |
| 5 | + |
| 6 | +As much as possible, an application should **write** manifest data that conforms to the recent [version 2.2](https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html) C2PA technical specification, but should be able to **read and validate** manifest data that conforms to earlier versions of the specification. This ensures that your application is "backward-compatible" and can still validate older assets with claims that were written in the past. |
| 7 | + |
| 8 | +## Legacy ingredients |
| 9 | + |
| 10 | +Old manifests may contain these kinds of deprecated ingredient data: |
| 11 | + |
| 12 | +- V1 ingredients, with labels that begin with `c2pa.ingredient`. |
| 13 | +- V2 ingredients, with labels that begin with `c2pa.ingredient.v2`. |
| 14 | + |
| 15 | +While these labels will show up so you can detect them, the API will return the same ingredient object for all of them, but the field contents may vary depending on the version. |
| 16 | + |
| 17 | + |
| 18 | +## Legacy actions |
| 19 | + |
| 20 | +Existing manifests may contain two versions of actions: original v1 actions, with label `c2pa.actions`, and revised v2 actions, with label `c2pa.actions.v2`. While a v1 action is fully specified in its actions array, a v2 action may either be fully specified in an element of the actions array or it may be derived from an element in the templates array with the same action name. |
| 21 | + |
| 22 | +As with Ingredients, a single `Actions` object handles both versions of actions. The label will be different for each version, and you may want to to check for both labels or use `starts_with`. |
| 23 | + |
| 24 | +<!-- |
| 25 | +FROM GAVIN: |
| 26 | +The rules for parsing actions templates needs to be added somewhere along with how to handle localizations. |
| 27 | +
|
| 28 | +I think we need to provide an action resolver for this. |
| 29 | +--> |
| 30 | + |
| 31 | +## Legacy metadata assertions |
| 32 | + |
| 33 | +Existing manifests may contain individual assertions for each metadata standard: |
| 34 | + |
| 35 | +- [Exif assertion](#exif-assertion) |
| 36 | +- [IPTC metadata assertion](#iptc-metadata-assertion) |
| 37 | +- [Creative Work assertion](#creative-work-assertion) |
| 38 | + |
| 39 | +In the latest version of the SDK, Exif and IPTC assertions are now CAWG assertions, and the CreativeWork assertion is not supported at all. |
| 40 | + |
| 41 | +### Exif assertion |
| 42 | + |
| 43 | +Exchangeable image file (Exif) format is a standard for storing technical metadata in image files of JPEG, TIFF, PNG, and other formats. Most digital cameras (including smartphones), scanners and other digital capture devices use Exif to store information such as device make and model, shutter speed, ISO number, date and time of capture, location, and so on. For more information on Exif, see the [Exif specification](https://www.cipa.jp/std/documents/download_e.html?DC-008-Translation-2019-E). |
| 44 | + |
| 45 | +Use an Exif assertion to add Exif information to the asset in a way that can be validated cryptographically. An Exif assertion has the label `stds.exif`. |
| 46 | + |
| 47 | +Here is a simple example: |
| 48 | + |
| 49 | +```json |
| 50 | +"assertions": [ |
| 51 | + ... |
| 52 | + { |
| 53 | + "label": "stds.exif", |
| 54 | + "data": { |
| 55 | + "@context" : { |
| 56 | + "exif": "http://ns.adobe.com/exif/1.0/" |
| 57 | + }, |
| 58 | + "exif:GPSVersionID": "2.2.0.0", |
| 59 | + "exif:GPSLatitude": "39,21.102N", |
| 60 | + "exif:GPSLongitude": "74,26.5737W", |
| 61 | + "exif:GPSAltitudeRef": 0, |
| 62 | + "exif:GPSAltitude": "100963/29890", |
| 63 | + "exif:GPSTimeStamp": "2019-09-22T18:22:57Z" |
| 64 | + } |
| 65 | + } |
| 66 | + ... |
| 67 | +] |
| 68 | +``` |
| 69 | + |
| 70 | +### IPTC metadata assertion |
| 71 | + |
| 72 | +An International Press Telecommunications Council (IPTC) metadata assertion represents properties from the [IPTC Photo Metadata Standard](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata) and [Video Metadata Standard](https://www.iptc.org/standards/video-metadata-hub/recommendation/) that describe ownership, rights, and descriptive metadata about an asset. |
| 73 | + |
| 74 | +An IPTC assertion has the label `stds.iptc` and is stored in JSON-LD format using the XMP field names and structures specified in the IPTC standards. |
| 75 | + |
| 76 | +Earlier versions of the C2PA specification defined the `stds.iptc.photo-metadata` label for IPTC photo metadata; starting with version 1.3, the C2PA specification defines the `stds.iptc` assertion that includes video metadata as well. |
| 77 | + |
| 78 | +See also [IPTC Photo Metadata User Guide](https://www.iptc.org/std/photometadata/documentation/userguide/). |
| 79 | + |
| 80 | +For example: |
| 81 | + |
| 82 | +```json |
| 83 | +... |
| 84 | +"assertions": [ |
| 85 | + ... |
| 86 | + { |
| 87 | + "label": "stds.iptc", |
| 88 | + "data": { |
| 89 | + "@context" : { |
| 90 | + "Iptc4xmpCore": "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", |
| 91 | + "Iptc4xmpExt": "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", |
| 92 | + "dc" : "http://purl.org/dc/elements/1.1/", |
| 93 | + "photoshop" : "http://ns.adobe.com/photoshop/1.0/", |
| 94 | + "plus" : "http://ns.useplus.org/ldf/xmp/1.0/", |
| 95 | + "xmp" : "http://ns.adobe.com/xap/1.0/", |
| 96 | + "xmpDM" : "http://ns.adobe.com/xmp/1.0/DynamicMedia/", |
| 97 | + "xmpRights" : "http://ns.adobe.com/xap/1.0/rights/" |
| 98 | + }, |
| 99 | + "photoshop:DateCreated": "Aug 31, 2022", |
| 100 | + "dc:creator": [ "Julie Smith" ], |
| 101 | + "Iptc4xmpExt:DigitalSourceType": "https://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture", |
| 102 | + "dc:rights": "Copyright (C) 2022 Example Photo Agency. All Rights Reserved.", |
| 103 | + "photoshop:Credit": "Julie Smith/Example Photo Agency via Example Distributor", |
| 104 | + "plus:licensor": [ |
| 105 | + { |
| 106 | + "plus:LicensorName": "Example Photo Agency", |
| 107 | + "plus:LicensorURL": "http://examplephotoagency.com/images/" |
| 108 | + } |
| 109 | + ], |
| 110 | + "xmpRights:WebStatement": "http://examplephotoagency.com/terms.html", |
| 111 | + "xmpRights:UsageTerms": [ |
| 112 | + "Not for online publication. Germany OUT" |
| 113 | + ], |
| 114 | + "Iptc4xmpExt:LocationCreated": { |
| 115 | + "Iptc4xmpExt:City": "San Francisco" |
| 116 | + }, |
| 117 | + "Iptc4xmpExt:PersonInImage": [ |
| 118 | + "Erika Fictional" |
| 119 | + ], |
| 120 | + "Iptc4xmpCore:AltTextAccessibility": "Photo of Erika Fictional standing in front of the Golden Gate Bridge at sunset." |
| 121 | + } |
| 122 | + }, |
| 123 | + ... |
| 124 | +] |
| 125 | +``` |
| 126 | + |
| 127 | +### Creative work assertion |
| 128 | + |
| 129 | +The deprecated creative work metadata assertion has the label `stds.schema-org.CreativeWork`. |
| 130 | + |
| 131 | +For example: |
| 132 | + |
| 133 | +```json |
| 134 | +... |
| 135 | +"assertions": [ |
| 136 | + ... |
| 137 | + { |
| 138 | + "label": "stds.schema-org.CreativeWork", |
| 139 | + "data": { |
| 140 | + "@context": "https://schema.org", |
| 141 | + "@type": "CreativeWork", |
| 142 | + "url": "https://stock.adobe.com/615559889" |
| 143 | + }, |
| 144 | + "kind": "Json" |
| 145 | + }, |
| 146 | + ... |
| 147 | +] |
| 148 | +``` |
| 149 | + |
| 150 | +## Legacy training and data mining assertion |
| 151 | + |
| 152 | +Old manifests may have training and data mining assertions with the following entry keys: |
| 153 | + |
| 154 | +- `c2pa.data_mining` |
| 155 | +- `c2pa.ai_training` |
| 156 | +- `c2pa.ai_generative_training` |
| 157 | +- `c2pa.ai_inference` |
| 158 | + |
| 159 | +These assertions have been replaced by [CAWG training and data mining assertions](../writing/assertions-actions.md#cawg-training-and-data-mining-assertion) with `cawg.*` entry keys. |
0 commit comments