Use native Core Graphics API on macOS to access and change image metadata
Project description
CGMetadata
Read and write image metadata on macOS from Python using the native ImageIO / Core Graphics frameworks.
CGMetadata is a Python wrapper around the macOS ImageIO and Core Graphics frameworks. It provides a simple interface for reading and writing image metadata, including EXIF, IPTC, and XMP data. Reading is supported for all image formats supported by ImageIO. Writing is not currently supported for RAW file formats.
Video formats are not currently supported.
Note: This is a work in progress and not yet ready for use.
Synopsis
>>> from cgmetadata import ImageMetadata
>>> md = ImageMetadata("IMG_1997.HEIC")
>>> md.properties
...
>>> md.exif
...
>>> md.xmp
...
>>> # write an XMP sidecar file
>>> with open("IMG_1997.xmp", "w") as fd:
... md.xmp_dump(fd)
...
Installation
pip install cgmetadata
Usage
...
CLI
...
API Reference
...
Supported Versions
CGMetadata has been tested on macOS 13 (Ventura) but should work on macOS 11 (Big Sur) and later. It will not work on earlier versions of macOS due to the use of certain APIs that were introduced in macOS 11. It is compatible with Python 3.9 and later.
License
MIT License, copyright Rhet Turnbull, 2023.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cgmetadata-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffcbbdb7ff416954859f307de862a6acdc7a2769e05e4a2720508b99db3b5490 |
|
MD5 | 02e05b0d76736de4e2adcac781937279 |
|
BLAKE2b-256 | 6f0c0f96308f569871a7976a973b4cb91f92c3a851a79f7131d2e4d185d01234 |