Skip to main content

original_image_bytes

Function original_image_bytes 

Source
pub fn original_image_bytes(
    conn: &Connection,
    face_id: i64,
) -> Result<(&'static str, Vec<u8>)>
Expand description

Bytes for the full original image behind a face (raw for common formats, QuickLook-converted JPEG for HEIC, with the HEIC result cached). Returns the MIME type alongside the bytes. Error::NotFound if the id is unknown or the file cannot be read/converted. Synchronous.

Holds conn only for the initial lookup (see original_lookup); callers that share conn behind a lock across many concurrent requests should call original_lookup/original_bytes_from_lookup directly instead, releasing the lock between the two.