Function nom_exif::parse_exif
source ยท pub fn parse_exif<T: Read>(
reader: T,
_: Option<FileFormat>,
) -> Result<Option<ExifIter>>Expand description
Deprecated: Please use crate::MediaParser instead.
Read exif data from reader, and build an ExifIter for it.
If
The format is None, the parser will detect the file format automatically.format param will be ignored from v2.0.0.
Currently supported file formats are:
- *.heic, *.heif, etc.
- *.jpg, *.jpeg, etc.
.tiff/.tif is not supported by this function, please use MediaParser
instead.
All entries are lazy-parsed. That is, only when you iterate over
ExifIter will the IFD entries be parsed one by one.
The one exception is the time zone entries. The parser will try to find and parse the time zone data first, so we can correctly parse all time information in subsequent iterates.
Please note that the parsing routine itself provides a buffer, so the
reader may not need to be wrapped with BufRead.
Returns:
- An
Ok<Some<ExifIter>>if Exif data is found and parsed successfully. - An
Ok<None>if Exif data is not found. - An
Errif Exif data is found but parsing failed.