in common-lib/src/main/scala/com/gu/mediaservice/lib/cleanup/InsertGuardianImageType.scala [22:73]
def toImageType(digitalSourceType: String): Option[String] = {
val Photograph = Some("Photograph")
val Illustration = Some("Illustration")
val Composite = Some("Composite")
// https://cv.iptc.org/newscodes/digitalsourcetype/
digitalSourceType match {
// Digital capture sampled from real life
case DigitalSourceType("digitalCapture") => Photograph
// Multi-frame computational capture sampled from real life
case DigitalSourceType("computationalCapture") => Photograph
// Digitised from a transparent negative
case DigitalSourceType("negativeFilm") => Photograph
// Digitised from a transparent positive
case DigitalSourceType("positiveFilm") => Photograph
// Digitised from a non-transparent medium
case DigitalSourceType("print") => None
// RETIRED Original media with minor human edits
case DigitalSourceType("minorHumanEdits") => None
// Human-edited media
case DigitalSourceType("humanEdits") => None
// Edited using Generative AI
case DigitalSourceType("compositeWithTrainedAlgorithmicMedia") => Illustration
// Algorithmically-altered media
case DigitalSourceType("algorithmicallyEnhanced") => Illustration
// RETIRED The digital image was created by computer software
case DigitalSourceType("softwareImage") => Illustration
// RETIRED Media created by a human using digital tools
case DigitalSourceType("digitalArt") => Illustration
// Media created by a human using non-generative tools
case DigitalSourceType("digitalCreation") => Illustration
// Digital media representation of data via human programming or creativity
case DigitalSourceType("dataDrivenMedia") => Illustration
// Created using Generative AI
case DigitalSourceType("trainedAlgorithmicMedia") => Illustration
// Media created purely by an algorithm not based on any sampled training data
case DigitalSourceType("algorithmicMedia") => Illustration
// A capture of the contents of the screen of a computer or mobile device
case DigitalSourceType("screenCapture") => Illustration
// Live recording of virtual event based on Generative AI and/or captured elements
case DigitalSourceType("virtualRecording") => None
// Mix or composite of several elements, any of which may or may not be generative AI
case DigitalSourceType("composite") => Composite
// Mix or composite of several elements that are all captures of real life
case DigitalSourceType("compositeCapture") => Composite
// Mix or composite of several elements, at least one of which is Generative AI
case DigitalSourceType("compositeSynthetic") => Illustration
// unknown
case other =>
logger.warn(s"Unexpected Iptc4xmpExt:DigitalSourceType value: $other. Consider adding a case for this value to DigitalSourceType.scala")
None
}
}