Metadata-Version: 2.1
Name: cgmetadata
Version: 0.0.1
Summary: Use native Core Graphics API on macOS to access and change image metadata
Author-email: Rhet Turnbull <rturnbull+git@gmail.com>
Requires-Python: >3.9
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: pyobjc-core>=9.2
Requires-Dist: pyobjc-framework-Contacts>=9.2
Requires-Dist: pyobjc-framework-CoreLocation>=9.2
Requires-Dist: pyobjc-framework-Quartz>=9.2
Requires-Dist: pyobjc-framework-UniformTypeIdentifiers>=9.2
Requires-Dist: wheel>=0.41.2
Requires-Dist: wurlitzer>=3.0.3
Requires-Dist: mkdocs>=1.4.2 ; extra == "docs"
Requires-Dist: mkdocs-material>=9.0.13 ; extra == "docs"
Requires-Dist: mkdocstrings-python>=0.8.3 ; extra == "docs"
Requires-Dist: pytest>=7.4.2 ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Requires-Dist: mypy>=1.6.1 ; extra == "test"
Project-URL: Home, https://github.com/RhetTbull/cgmetadata
Provides-Extra: docs
Provides-Extra: test

# 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

```pycon
>>> 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

```bash
pip install cgmetadata
```

## Usage

```python
...
```

## CLI

```bash
...
```

## API Reference

```python
...
```

## 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.

