Struct IfdDecoder
pub struct IfdDecoder<'lt> { /* private fields */ }
Reads a directory's tag values from an underlying stream.
Implementations
impl IfdDecoder<'_>
fn find_entry(&self, tag: Tag) -> Option<Entry>Retrieve the IFD entry for a given tag, if it exists.
The entry contains the metadata of the value, that is its type and count from which we can calculate a total byte size.
fn find_tag(&mut self, tag: Tag) -> TiffResult<Option<Value>>Tries to retrieve a tag. Return
Ok(None)if the tag is not present.fn find_tag_buf(&mut self, tag: Tag, buf: &mut ValueBuffer) -> TiffResult<Option<Entry>>Retrieve a tag and reproduce its bytes into the provided buffer.
The buffer is unmodified if the tag is not present.
fn find_tag_bytes(&mut self, tag: Tag, buf: &mut [u8], offset: u64) -> TiffResult<Option<usize>>Read bytes of a tag's value into a byte buffer.
fn find_tag_unsigned<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<Option<T>>Tries to retrieve a tag and convert it to the desired unsigned type.
fn find_tag_unsigned_vec<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<Option<Vec<T>>>Tries to retrieve a vector of all a tag's values and convert them to the desired unsigned type.
fn get_tag_unsigned<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<T>Tries to retrieve a tag and convert it to the desired unsigned type. Returns an error if the tag is not present.
fn get_tag(&mut self, tag: Tag) -> TiffResult<Value>Tries to retrieve a tag. Returns an error if the tag is not present
fn get_tag_u32(&mut self, tag: Tag) -> TiffResult<u32>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u64(&mut self, tag: Tag) -> TiffResult<u64>fn get_tag_f32(&mut self, tag: Tag) -> TiffResult<f32>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_f64(&mut self, tag: Tag) -> TiffResult<f64>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Vec<u32>>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u16_vec(&mut self, tag: Tag) -> TiffResult<Vec<u16>>fn get_tag_u64_vec(&mut self, tag: Tag) -> TiffResult<Vec<u64>>fn get_tag_f32_vec(&mut self, tag: Tag) -> TiffResult<Vec<f32>>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_f64_vec(&mut self, tag: Tag) -> TiffResult<Vec<f64>>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u8_vec(&mut self, tag: Tag) -> TiffResult<Vec<u8>>Tries to retrieve a tag and convert it to a 8bit vector.
fn get_tag_ascii_string(&mut self, tag: Tag) -> TiffResult<String>Tries to retrieve a tag and convert it to a ascii vector.
fn directory(&self) -> &DirectoryInspect the raw underlying directory.
impl<'l> IfdDecoder<'l>
fn tag_iter(self) -> impl Iterator<Item = TiffResult<(Tag, Value)>> + 'lReturns an iterator over all tags in the current image, along with their values.