ocrd_models.ocrd_exif module

Technical image metadata

class ocrd_models.ocrd_exif.OcrdExif(img)[source]

Bases: object

Represents technical image metadata.

Members:

  • width / height: pixel dimensions
  • photometricInterpretation: pixel type/depth, e.g. ‘1’ for b/w, ‘L’ for 8-bit grayscale, ‘RGB’ for 24-bit truecolor, ‘I’ for 32-bit signed integer grayscale, ‘F’ for floating-point grayscale (see PIL concept mode)
  • resolution / xResolution / yResolution: pixel density
  • resolutionUnits: unit of measurement (either inches or cm)
to_xml()[source]

Serialize all properties as XML