Why pngmeta?
🚀
Simple API
Dictionary-style access makes it easy to read and write metadata. Similar to iptcinfo3 for a familiar experience.
📦
Zero Dependencies
Pure Python implementation with no external dependencies. Just install and use.
✨
Full PNG Support
Handles tEXt, iTXt, and zTXt chunks. Complete support for UTF-8 and compressed text.
🎨
XMP Compatible
Read and write XMP metadata in PNG files for cross-format compatibility.
⚡
Fast & Efficient
Minimal overhead. Metadata typically adds only 100-2000 bytes to file size.
🔓
Public Domain
Released under Unlicense. Use it however you want, commercially or personally.
Quick Example
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')
It's that simple!
- ✓ Dictionary-style access
- ✓ Read existing metadata
- ✓ Add or modify fields
- ✓ Save in-place or to new file
- ✓ Works with any PNG image
Comprehensive Metadata Support
Standard Fields
- Title
- Author
- Description
- Copyright
- Creation Time
- Software
- Comment
- + Any custom field
PNG Chunks
tEXt- Latin-1 textiTXt- UTF-8 textzTXt- Compressed text- Automatic chunk selection
- Proper CRC calculation
- Standards compliant
XMP Support
- Read XMP metadata
- Write XMP data
- Adobe XMP format
- Cross-format compatible
- Structured metadata
- Industry standard
Latest Release
Fetching release information...
Documentation
Similar to iptcinfo3
If you're familiar with iptcinfo3, you'll feel right at home with pngmeta.
iptcinfo3 (JPEG)
from iptcinfo3 import IPTCInfo
info = IPTCInfo('photo.jpg')
info['caption/abstract'] = 'Caption'
info.save()
pngmeta (PNG)
from pngmeta import PngMeta
meta = PngMeta('photo.png')
meta['Description'] = 'Caption'
meta.save()