Expand description
Friendly camera-name resolution.
EXIF Make/Model tags often hold internal codenames (M2007J20CI,
ILCE-7M3, iPhone15,2) — useless to a human reading the photo
info panel. This module turns them into the marketing names users
actually recognise.
Strategy, in priority order:
- Pattern-based transforms for prefixes we can decode without a lookup (Sony ILCE → α-series, Canon EOS → keep, Apple iPhone DeviceCode → marketing name from a small static map).
- Curated codename table for the long tail of Android codenames (Xiaomi, OnePlus, Realme, etc.) where the EXIF Model is an unreadable internal ID.
- Optional CSV lookup at
data/device_codenames.csv, loaded lazily once. Lets users (orsetup_assets.sh) drop in a richer list — same shape as Google Play’s public supported-devices CSV (retail_branding,marketing_name,device,model) — without us bundling a 700 KB file. - Smart fallback: combine
make+model, dedup if model already starts with the make, title-case where it looks like a codename, leave alone where it doesn’t.
Everything is pure-Rust, offline, and never makes a network call.
Functions§
- friendly_
camera_ name - Resolve
make+model(raw EXIF) into a friendly display name. ReturnsNoneonly when both are empty.