Skip to main content

Module local_exif

Module local_exif 

Source
Expand description

EXIF / XMP metadata extraction for local files.

Uses nom-exif — pure-Rust, no native dependencies. Reads metadata from JPEG, PNG, TIFF, WebP, HEIF / HEIC, JXL and MP4 / MOV. RAW formats fall through as “no metadata”; that case is hidden in the UI rather than shown as an error.

Results are cached on disk keyed by (mtime, size) so re-opening the lightbox on the same file doesn’t re-parse a multi-megabyte image. EXIF / XMP extraction via nom-exif. Disk-cached by (mtime, size).

Structs§

CacheEntry 🔒
CacheKey 🔒
LocalExif
Mirrors remote ExifInfo so the renderer is source-agnostic.

Functions§

cache_key 🔒
cache_root
Cache directory for EXIF entries; lives under the same XDG cache root used by the thumbnail cache.
datetime_rfc3339 🔒
Combine DateTimeOriginal with OffsetTimeOriginal (when present) into a stable RFC3339 string.
exposure_time 🔒
Display exposure as “1/250” rather than the raw rational.
integer_u32 🔒
load_or_extract
Disk-cached read_exif; key is (mtime_nanos, size).
parse_offset 🔒
Validate a raw “+HH:MM” / “-HH:MM” offset string from OffsetTimeOriginal.
rational_f64 🔒
read_exif
Returns None if the file has no recognisable metadata.
text 🔒