Python:Images

From wiki
Revision as of 19:23, 13 July 2025 by Hdridder (talk | contribs) (Created page with "Category:Python Images can have meta-data embedded. Most used is Exif[https://nl.wikipedia.org/wiki/Exchangeable_image_file_format], other formats are IPT[https://nl.wikipedia.org/wiki/IPTC] and XMP[https://nl.wikipedia.org/wiki/Extensible_Metadata_Platform]. ;import pyexiv2 :Module that handles all types of metadata <syntaxhighlight lang=python> import pyexiv2 metadata = pyexiv2.ImageMetadata(imagefile) metadata.read() print(f"Metadata for {imagefile}") for key,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Images can have meta-data embedded. Most used is Exif[1], other formats are IPT[2] and XMP[3].

import pyexiv2
Module that handles all types of metadata
import pyexiv2

metadata = pyexiv2.ImageMetadata(imagefile)
metadata.read()
print(f"Metadata for {imagefile}")
for key, value in metadata.items():
    print(f"{key}, {value}")