[−][src]Trait purrmitive::ImageDecoderExt
Specialized image decoding not be supported by all formats
Required methods
pub fn read_rect_with_progress<F>(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
[src]
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
Decode a rectangular section of the image, periodically reporting progress.
The output buffer will be filled with fields specified by
ImageDecoder::color_type()
,
in that order, each field represented in native-endian.
The progress callback will be called at least once at the start and the end of decoding, implementations are encouraged to call this more often, with a frequency meaningful for display to the end-user.
This function will panic if the output buffer isn't at least
color_type().bytes_per_pixel() * color_type().channel_count() * width * height
bytes long.
Provided methods
pub fn read_rect(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8]
) -> Result<(), ImageError>
[src]
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8]
) -> Result<(), ImageError>
Decode a rectangular section of the image; see read_rect_with_progress()
.
Implementors
impl<'a, R> ImageDecoderExt<'a> for BmpDecoder<R> where
R: 'a + Read + Seek,
[src]
R: 'a + Read + Seek,
pub fn read_rect_with_progress<F>(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
[src]
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
impl<'a, R> ImageDecoderExt<'a> for DxtDecoder<R> where
R: 'a + Read + Seek,
[src]
R: 'a + Read + Seek,
pub fn read_rect_with_progress<F>(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
[src]
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
impl<'a, R> ImageDecoderExt<'a> for FarbfeldDecoder<R> where
R: 'a + Read + Seek,
[src]
R: 'a + Read + Seek,
pub fn read_rect_with_progress<F>(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
[src]
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
impl<'a, R> ImageDecoderExt<'a> for HDRAdapter<R> where
R: 'a + Seek + BufRead,
[src]
R: 'a + Seek + BufRead,