Module: C2PA::DigitalSourceTypes

Defined in:
lib/c2pa/digital_source_types.rb

Overview

URIs from the IPTC Digital Source Type NewsCodes vocabulary.

The C2PA specification requires every c2pa.created action to declare one of these, so consumers can tell how the asset came into being. Pick the one that honestly describes the asset — this is a provenance claim, and c2pa-rs will not second-guess the value you supply.

Constant Summary collapse

BASE =
"http://cv.iptc.org/newscodes/digitalsourcetype"
UNSPECIFIED =

Declining to claim a source type, rather than guessing at one.

c2pa-rs requires c2pa.created to carry a digitalSourceType but accepts any string, so a wrong value validates silently. When the origin is not known — a generic signing service, say — this says so, instead of asserting something untrue. It is the value c2pa-rs uses throughout its own fixtures.

"http://c2pa.org/digitalsourcetype/empty"
DIGITAL_CAPTURE =

Captured from real life

"#{BASE}/digitalCapture"
COMPUTATIONAL_CAPTURE =
"#{BASE}/computationalCapture"
SCREEN_CAPTURE =
"#{BASE}/screenCapture"
VIRTUAL_RECORDING =
"#{BASE}/virtualRecording"
NEGATIVE_FILM =

Digitised from a physical medium

"#{BASE}/negativeFilm"
POSITIVE_FILM =
"#{BASE}/positiveFilm"
"#{BASE}/print"
HUMAN_EDITS =

Human- or software-authored

"#{BASE}/humanEdits"
DIGITAL_CREATION =
"#{BASE}/digitalCreation"
ALGORITHMICALLY_ENHANCED =
"#{BASE}/algorithmicallyEnhanced"
DATA_DRIVEN_MEDIA =
"#{BASE}/dataDrivenMedia"
ALGORITHMIC_MEDIA =
"#{BASE}/algorithmicMedia"
TRAINED_ALGORITHMIC_MEDIA =

Generative AI

"#{BASE}/trainedAlgorithmicMedia"
COMPOSITE_WITH_TRAINED_ALGORITHMIC_MEDIA =
"#{BASE}/compositeWithTrainedAlgorithmicMedia"
COMPOSITE_SYNTHETIC =
"#{BASE}/compositeSynthetic"
COMPOSITE =

Composites

"#{BASE}/composite"
COMPOSITE_CAPTURE =
"#{BASE}/compositeCapture"
ALL =

Every type defined above. Supplying a URI outside this list is allowed — the vocabulary is extensible — but the values here cover the standard set.

[
  UNSPECIFIED,
  DIGITAL_CAPTURE,
  COMPUTATIONAL_CAPTURE,
  SCREEN_CAPTURE,
  VIRTUAL_RECORDING,
  NEGATIVE_FILM,
  POSITIVE_FILM,
  PRINT,
  HUMAN_EDITS,
  DIGITAL_CREATION,
  ALGORITHMICALLY_ENHANCED,
  DATA_DRIVEN_MEDIA,
  ALGORITHMIC_MEDIA,
  TRAINED_ALGORITHMIC_MEDIA,
  COMPOSITE_WITH_TRAINED_ALGORITHMIC_MEDIA,
  COMPOSITE_SYNTHETIC,
  COMPOSITE,
  COMPOSITE_CAPTURE
].freeze