Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
- Install:
pip install pyexiv2
- Source code on GitHub
- Tutorial | 中文教程
- Base on C++ API of Exiv2 and wrapped with pybind11.
- Supports running on 64bit Linux, MacOS and Windows, with CPython(≥3.6) interpreter.
- Supports various image metadata
- Supports various image formats
- Supports opening images based on the file path or from bytes data.
- Supports Unicode characters that contained in image path or metadata.
- Can't read the image larger than 2GB, or modify the image larger than 1GB. (related issue)
- Not thread safe, because pyexiv2 uses some global variables in C++.
- Currently, if you use ARM platform, you need to compile exiv2 and pyexiv2 manually, which is troublesome. (related issue)
There are some test cases in folder pyexiv2/tests.
-
Similar projects:
- exiv2 is a C++ library for reading and writing various image metadata, including command-line tools.
- pyexiv2 is a Python2 binding to exiv2, hasn't been updated since 2011.
- py3exiv2 is a Python3 binding to exiv2, wrapped with Boost.Python.
- python-exiv2 is a Python3 binding to exiv2, wrapped with SWIG. The intention is to give direct access to all of the top-level classes in exiv2.
- exiftool is a perl library for reading and writing various image metadata, including command-line tools.
-
Books: