naturtag.metadata.image_metadata module#

class naturtag.metadata.image_metadata.ImageMetadata(image_path='')#

Bases: object

Wrapper class for reading & writing basic image metadata with exiv2

property filtered_exif: dict[str, Any]#

Get EXIF tags, excluding some verbose manufacturer tags that aren’t useful to display

property has_sidecar: bool#
property is_sidecar: bool#
read_metadata()#

Read all formats of metadata from image + sidecar file

property sidecar_path: Path#

Get the path to a sidecar file for this image. May be in the format: * {basename}.xmp (default) * {basename}.{ext}.{xmp} (used only if it already exists)

property simple_exif: dict[str, str]#

Convert all EXIF tags with list values into strings

update(new_metadata)#

Update arbitrary EXIF, IPTC, and/or XMP metadata

write(write_exif=True, write_iptc=True, write_xmp=True, write_sidecar=True)#

Write current metadata to image and sidecar