Exif/metadata parsing library written in pure Rust with nom.
- Images
- JPEG
- HEIF/HEIC
- Videos
- MOV
- MP4
- Zero-copy when appropriate: Use borrowing and slicing instead of copying whenever possible.
- Minimize I/O operations: When metadata is stored at the end/middle of a
large file (such as a MOV/HEIC file does),
Seek
rather thanRead
to quickly locate the location of the metadata. - Pay as you go: When extracting Exif data, only the information corresponding to the specified Exif tags are parsed to reduce the overhead when processing a large number of files.
- Robustness and stability: Through long-term Fuzz testing, and tons of crash issues discovered during testing have been fixed. Thanks to @sigaloid for pointing this out!
- Images
- Videos
- examples
cargo run --example rexiftool testdata/meta.mov
:
com.apple.quicktime.make => Apple
com.apple.quicktime.model => iPhone X
com.apple.quicktime.software => 12.1.2
com.apple.quicktime.location.ISO6709 => +27.1281+100.2508+000.000/
com.apple.quicktime.creationdate => 2019-02-12T15:27:12+08:00
duration => 500
width => 720
height => 1280
cargo run --features json_dump --example rexiftool -- -j testdata/meta.mov
:
{
"height": "1280",
"duration": "500",
"width": "720",
"com.apple.quicktime.creationdate": "2019-02-12T15:27:12+08:00",
"com.apple.quicktime.make": "Apple",
"com.apple.quicktime.model": "iPhone X",
"com.apple.quicktime.software": "12.1.2",
"com.apple.quicktime.location.ISO6709": "+27.1281+100.2508+000.000/"
}