pub fn next_image(&mut self) -> TiffResult<()> {
        self.ifd = Some(self.read_ifd()?);
        self.width = self.get_tag_u32(Tag::ImageWidth)?;
        self.height = self.get_tag_u32(Tag::ImageLength)?;
        self.strip_decoder = None;

        self.photometric_interpretation = self
            .find_tag_unsigned(Tag::PhotometricInterpretation)?
            .and_then(PhotometricInterpretation::from_u16)
            .ok_or(TiffUnsupportedError::UnknownInterpretation)?;

        if let Some(val) = self.find_tag_unsigned(Tag::Compression)? {
            self.compression_method = CompressionMethod::from_u16(val)
                .ok_or(TiffUnsupportedError::UnknownCompressionMethod)?;
        }
        if let Some(val) = self.find_tag_unsigned(Tag::SamplesPerPixel)? {
            self.samples = val;
        }
        match self.samples {
            1 | 3 | 4 => if let Some(val) = self.find_tag_unsigned_vec(Tag::BitsPerSample)? {
                self.bits_per_sample = val;
            },
            _ => return Err(TiffUnsupportedError::UnsupportedSampleDepth(self.samples).into()),
        }
        Ok(())
    }
/// Reads in the next image.
/// If there is no further image in the TIFF file a format error is returned.
/// To determine whether there are more images call `TIFFDecoder::more_images` instead.
Reads in the next image.
If there is no further image in the TIFF file a format error is returned.
To determine whether there are more images call `TIFFDecoder::more_images` instead.
Reads in the next image . If there is no further image in the TIFF file a format error is returned . To determine whether there are more images call ` TIFFDecoder :: more_images ` instead .
pub fn next_image(&mut self) -> TiffResult<()> {
        self.ifd = Some(self.read_ifd()?);
        self.width = self.get_tag_u32(Tag::ImageWidth)?;
        self.height = self.get_tag_u32(Tag::ImageLength)?;
        self.strip_decoder = None;
        self.photometric_interpretation = self
            .find_tag_unsigned(Tag::PhotometricInterpretation)?
            .and_then(PhotometricInterpretation::from_u16)
            .ok_or(TiffUnsupportedError::UnknownInterpretation)?;
        if let Some(val) = self.find_tag_unsigned(Tag::Compression)? {
            self.compression_method = CompressionMethod::from_u16(val)
                .ok_or(TiffUnsupportedError::UnknownCompressionMethod)?;
        }
        if let Some(val) = self.find_tag_unsigned(Tag::SamplesPerPixel)? {
            self.samples = val;
        }
        match self.samples {
            1 | 3 | 4 => if let Some(val) = self.find_tag_unsigned_vec(Tag::BitsPerSample)? {
                self.bits_per_sample = val;
            },
            _ => return Err(TiffUnsupportedError::UnsupportedSampleDepth(self.samples).into()),
        }
        Ok(())
    }
pub fn next_image ( & mut self ) -> TiffResult < ( ) > { self . ifd = Some ( self . read_ifd ( ) ? ) ; self . width = self . get_tag_u32 ( Tag :: ImageWidth ) ? ; self . height = self . get_tag_u32 ( Tag :: ImageLength ) ? ; self . strip_decoder = None ; self . photometric_interpretation = self . find_tag_unsigned ( Tag :: PhotometricInterpretation ) ? . and_then ( PhotometricInterpretation :: from_u16 ) . ok_or ( TiffUnsupportedError :: UnknownInterpretation ) ? ; if let Some ( val ) = self . find_tag_unsigned ( Tag :: Compression ) ? { self . compression_method = CompressionMethod :: from_u16 ( val ) . ok_or ( TiffUnsupportedError :: UnknownCompressionMethod ) ? ; } if let Some ( val ) = self . find_tag_unsigned ( Tag :: SamplesPerPixel ) ? { self . samples = val ; } match self . samples { 1 | 3 | 4 => if let Some ( val ) = self . find_tag_unsigned_vec ( Tag :: BitsPerSample ) ? { self . bits_per_sample = val ; } , _ => return Err ( TiffUnsupportedError :: UnsupportedSampleDepth ( self . samples ) . into ( ) ) , } Ok ( ( ) ) }
Reads in the next image.
Reads in the next image .
&mut self
&mut self