diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs index c4b8fed..fced943 100644 --- a/src/decoder/mod.rs +++ b/src/decoder/mod.rs @@ -632,6 +632,16 @@ impl Decoder { self.get_tag(tag)?.into_u32() } + /// Tries to retrieve a tag and convert it to the desired type. + pub fn get_tag_f32(&mut self, tag: Tag) -> TiffResult { + self.get_tag(tag)?.into_f32() + } + + /// Tries to retrieve a tag and convert it to the desired type. + pub fn get_tag_f64(&mut self, tag: Tag) -> TiffResult { + self.get_tag(tag)?.into_f64() + } + /// Tries to retrieve a tag and convert it to the desired type. pub fn get_tag_u32_vec(&mut self, tag: Tag) -> TiffResult> { self.get_tag(tag)?.into_u32_vec()