pub fn make_face_thumb(
path: &str,
bbox: [f32; 4],
face_id: i64,
) -> Option<DynamicImage>Expand description
Load, crop, and orientation-correct a face thumbnail.
bbox coordinates are stored in terms of the full-size decoded image (videre faces rescales detections back to original width/height before writing to the DB), so the thumbnail must be cropped from an image of the same dimensions used at detection time.
For HEIC: videre faces converts via QuickLook (see
videre_core::heic::heic_via_quicklook), which already applies correct
rotation, so no separate orientation step is needed. For JPEG/PNG/etc:
detection ran on raw pixels; apply EXIF orientation after crop.
pub (unlike the three helpers above it): videre report’s static-report
base64 thumbnail path (face_thumb_b64 in report.rs) also needs this
exact crop+orientation logic, so it calls through here instead of keeping
its own duplicate copy.