Skip to main content

extract_exif_from_reader

Function extract_exif_from_reader 

Source
pub fn extract_exif_from_reader<R: BufRead + Seek>(
    reader: &mut R,
) -> ExifExtract
Expand description

Extract the EXIF fields Capsule indexes from a seekable reader over a file’s contents.

Generic over the reader so opening the file stays the caller’s business (capsule-library hands a buffered file handle here). Contents that are not an EXIF container yield an all-None extract rather than an error — a file without EXIF is ordinary, not a failure — and are read only as far as the container sniff needs, so a large non-EXIF original is never held whole. Only an EXIF container is rewound and read to its end, for the Live Photo content identifier; a read failure there leaves that one field None.