Dictionary-style access makes it easy to read and write metadata. Similar to iptcinfo3 for a familiar experience.
Pure Python implementation with no external dependencies. Just install and use.
Handles tEXt, iTXt, and zTXt chunks. Complete support for UTF-8 and compressed text.
Read and write XMP metadata in PNG files for cross-format compatibility.
Minimal overhead. Metadata typically adds only 100-2000 bytes to file size.
Released under Unlicense. Use it however you want, commercially or personally.
pip install pngmeta
Or with uv:
uv pip install pngmeta
from pngmeta import PngMeta
# Open an image
meta = PngMeta('photo.png')
# Read metadata
print(meta['Title'])
print(meta['Author'])
# Add metadata
meta['Title'] = 'Sunset Over Mountains'
meta['Author'] = 'Jane Photographer'
meta['Copyright'] = '© 2025 Jane'
# Save changes
meta.save()
# Or save to new file
meta.save('photo_with_metadata.png')
tEXt
- Latin-1 textiTXt
- UTF-8 textzTXt
- Compressed textGet up and running in minutes with our comprehensive README
Real-world examples including interactive demo with colored output
Learn how to contribute and set up your development environment
View package details, version history, and download statistics
If you're familiar with iptcinfo3, you'll feel right at home with pngmeta.
from iptcinfo3 import IPTCInfo
info = IPTCInfo('photo.jpg')
info['caption/abstract'] = 'Caption'
info.save()
from pngmeta import PngMeta
meta = PngMeta('photo.png')
meta['Description'] = 'Caption'
meta.save()