XMPKit
Pure Rust implementation of Adobe XMP Toolkit
Overview
XMPKit is a pure Rust implementation of Adobe's XMP (Extensible Metadata Platform) Toolkit. It provides APIs for reading, writing, and manipulating XMP metadata in various file formats without any C++ dependencies.
Features
- Pure Rust implementation
- Compatible with Adobe XMP standard
- Support for common file formats
- Memory safe and high performance
- Zero-cost abstractions
- Cross-platform support
Optional Features
| Feature | Description |
|---|---|
optimize-file-layout |
Optimize file layout for streaming (MPEG4: UUID box after moov, before mdat) |
Note: MPEG4/MOV files automatically reconcile QuickTime native metadata (©nam, ©ART, cprt, etc.) to XMP by default. Use XmpOptions::only_xmp() to skip reconciliation.
Quick Start
use ;
// Open an image file
let mut file = new;
file.open?;
// Read XMP metadata
if let Some = file.get_xmp
// Modify metadata
if let Some = file.get_xmp.cloned
// Save the modified image
file.save?;
Documentation
Full API documentation is available at docs.rs/xmpkit.
For WebAssembly/JavaScript integration, see WEBASSEMBLY.md, here is a online demo.
Project Status
File Format Support
| Format | Extensions | Read XMP | Write XMP | Status |
|---|---|---|---|---|
| JPEG | .jpg, .jpeg | Yes | Yes | Fully supported |
| PNG | .png | Yes | Yes | Fully supported |
| GIF | .gif | Yes | Yes | Fully supported |
| WebP | .webp | Yes | Yes | Fully supported |
| SVG | .svg | Yes | Yes | Fully supported |
| TIFF | .tif, .tiff | Yes | Yes | Fully supported |
| HEIF | .heif, .heic, .avif | Yes | Yes | Fully supported |
| MP3 | .mp3 | Yes | Yes | Fully supported |
| WAV | .wav | Yes | Yes | Fully supported |
| AVI | .avi | Yes | Yes | Fully supported |
| MP4 | .mp4, .m4a, .m4v | Yes | Yes | Fully supported |
| MOV | .mov | Yes | Yes | Fully supported |
| Yes | Yes | Fully supported | ||
| PSD | .psd, .psb | Yes | Yes | Fully supported |
Platform Support
| Platform | Architecture | File I/O | Memory I/O | Status |
|---|---|---|---|---|
| macOS | x86_64, arm64 | Yes | Yes | Fully supported |
| Linux | x86_64, arm64 | Yes | Yes | Fully supported |
| Windows | x86_64, arm64 | Yes | Yes | Fully supported |
| iOS | arm64 | Yes | Yes | Fully supported |
| Android | arm64, armv7, x86_64 | Yes | Yes | Fully supported |
| HarmonyOS | arm64, armv7, x86_64 | Yes | Yes | Fully supported |
| WebAssembly | wasm32 | No | Yes | Partially Supported |
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.