pub fn scale(&mut self, requested_width: u16, requested_height: u16) -> Result<(u16, u16)> {
        self.read_info()?;
        let frame = self.frame.as_mut().unwrap();
        let idct_size = super::idct::choose_idct_size(
            frame.image_size,
            Dimensions {
                width: requested_width,
                height: requested_height,
            },
        );
        frame.update_idct_size(idct_size)?;
        Ok((frame.output_size.width, frame.output_size.height))
    }
/// Configure the decoder to scale the image during decoding.
///
/// This efficiently scales the image by the smallest supported scale
/// factor that produces an image larger than or equal to the requested
/// size in at least one axis. The currently implemented scale factors
/// are 1/8, 1/4, 1/2 and 1.
///
/// To generate a thumbnail of an exact size, pass the desired size and
/// then scale to the final size using a traditional resampling algorithm.
Configure the decoder to scale the image during decoding.
This efficiently scales the image by the smallest supported scale
factor that produces an image larger than or equal to the requested
size in at least one axis. The currently implemented scale factors
are 1/8, 1/4, 1/2 and 1.

To generate a thumbnail of an exact size, pass the desired size and
then scale to the final size using a traditional resampling algorithm.
Configure the decoder to scale the image during decoding . This efficiently scales the image by the smallest supported scale factor that produces an image larger than or equal to the requested size in at least one axis . The currently implemented scale factors are 1 / 8 1 / 4 1 / 2 and 1 . To generate a thumbnail of an exact size pass the desired size and then scale to the final size using a traditional resampling algorithm .
pub fn scale(&mut self, requested_width: u16, requested_height: u16) -> Result<(u16, u16)> {
        self.read_info()?;
        let frame = self.frame.as_mut().unwrap();
        let idct_size = super::idct::choose_idct_size(
            frame.image_size,
            Dimensions {
                width: requested_width,
                height: requested_height,
            },
        );
        frame.update_idct_size(idct_size)?;
        Ok((frame.output_size.width, frame.output_size.height))
    }
pub fn scale ( & mut self , requested_width : u16 , requested_height : u16 ) -> Result < ( u16 , u16 ) > { self . read_info ( ) ? ; let frame = self . frame . as_mut ( ) . unwrap ( ) ; let idct_size = super :: idct :: choose_idct_size ( frame . image_size , Dimensions { width : requested_width , height : requested_height , } , ) ; frame . update_idct_size ( idct_size ) ? ; Ok ( ( frame . output_size . width , frame . output_size . height ) ) }
Configure the decoder to scale the image during decoding.
Configure the decoder to scale the image during decoding .
&mut self
requested_width
u16
requested_height
u16