pub fn read_image(&mut self) -> TiffResult<DecodingResult> {
        self.initialize_strip_decoder()?;
        let rows_per_strip = usize::try_from(self
            .get_tag_u32(Tag::RowsPerStrip)
            .unwrap_or(self.height))?;

        let samples_per_strip =
            usize::try_from(self.width)? * rows_per_strip * self.bits_per_sample.len();

        let mut result = self.result_buffer(usize::try_from(self.height)?)?;

        for i in 0..usize::try_from(self.strip_count()?)? {
            self.read_strip_to_buffer(result.as_buffer(samples_per_strip * i))?;
        }

        Ok(result)
    }
/// Decodes the entire image and return it as a Vector
Decodes the entire image and return it as a Vector
Decodes the entire image and return it as a Vector
pub fn read_image(&mut self) -> TiffResult<DecodingResult> {
        self.initialize_strip_decoder()?;
        let rows_per_strip = usize::try_from(self
            .get_tag_u32(Tag::RowsPerStrip)
            .unwrap_or(self.height))?;
        let samples_per_strip =
            usize::try_from(self.width)? * rows_per_strip * self.bits_per_sample.len();
        let mut result = self.result_buffer(usize::try_from(self.height)?)?;
        for i in 0..usize::try_from(self.strip_count()?)? {
            self.read_strip_to_buffer(result.as_buffer(samples_per_strip * i))?;
        }
        Ok(result)
    }
pub fn read_image ( & mut self ) -> TiffResult < DecodingResult > { self . initialize_strip_decoder ( ) ? ; let rows_per_strip = usize :: try_from ( self . get_tag_u32 ( Tag :: RowsPerStrip ) . unwrap_or ( self . height ) ) ? ; let samples_per_strip = usize :: try_from ( self . width ) ? * rows_per_strip * self . bits_per_sample . len ( ) ; let mut result = self . result_buffer ( usize :: try_from ( self . height ) ? ) ? ; for i in 0 .. usize :: try_from ( self . strip_count ( ) ? ) ? { self . read_strip_to_buffer ( result . as_buffer ( samples_per_strip * i ) ) ? ; } Ok ( result ) }
Decodes the entire image and return it as a Vector
Decodes the entire image and return it as a Vector
&mut self
&mut self