Trait image::ImageDecoder [−][src]
The trait that all decoders implement
Required methods
fn dimensions(&mut self) -> ImageResult<(u32, u32)>[src]
Returns a tuple containing the width and height of the image
fn colortype(&mut self) -> ImageResult<ColorType>[src]
Returns the color type of the image e.g. RGB(8) (8bit RGB)
fn row_len(&mut self) -> ImageResult<usize>[src]
Returns the length in bytes of one decoded row of the image
fn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>[src]
Reads one row from the image into buf and returns the row index
fn read_image(&mut self) -> ImageResult<DecodingResult>[src]
Decodes the entire image and return it as a Vector
Provided methods
fn is_animated(&mut self) -> ImageResult<bool>[src]
Returns true if the image is animated
fn into_frames(self) -> ImageResult<Frames>[src]
Returns the frames of the image
If the image is not animated it returns a single frame
fn load_rect(
&mut self,
x: u32,
y: u32,
length: u32,
width: u32
) -> ImageResult<Vec<u8>>[src]
&mut self,
x: u32,
y: u32,
length: u32,
width: u32
) -> ImageResult<Vec<u8>>
Decodes a specific region of the image, represented by the rectangle
starting from x and y and having length and width
Implementors
impl<R: BufRead> ImageDecoder for HDRAdapter<R>[src]
fn dimensions(&mut self) -> ImageResult<(u32, u32)>[src]
fn colortype(&mut self) -> ImageResult<ColorType>[src]
fn row_len(&mut self) -> ImageResult<usize>[src]
fn read_scanline(&mut self, _: &mut [u8]) -> ImageResult<u32>[src]
fn read_image(&mut self) -> ImageResult<DecodingResult>[src]
impl<R: Read + Seek> ImageDecoder for BMPDecoder<R>[src]
fn dimensions(&mut self) -> ImageResult<(u32, u32)>[src]
fn colortype(&mut self) -> ImageResult<ColorType>[src]
fn row_len(&mut self) -> ImageResult<usize>[src]
fn read_scanline(&mut self, _buf: &mut [u8]) -> ImageResult<u32>[src]
fn read_image(&mut self) -> ImageResult<DecodingResult>[src]
impl<R: Read + Seek> ImageDecoder for ICODecoder<R>[src]
fn dimensions(&mut self) -> ImageResult<(u32, u32)>[src]
fn colortype(&mut self) -> ImageResult<ColorType>[src]
fn row_len(&mut self) -> ImageResult<usize>[src]
fn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>[src]
fn read_image(&mut self) -> ImageResult<DecodingResult>[src]
impl<R: Read + Seek> ImageDecoder for TGADecoder<R>[src]
fn dimensions(&mut self) -> ImageResult<(u32, u32)>[src]
fn colortype(&mut self) -> ImageResult<ColorType>[src]
fn row_len(&mut self) -> ImageResult<usize>[src]
fn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>[src]
fn read_image(&mut self) -> ImageResult<DecodingResult>[src]
impl<R: Read + Seek> ImageDecoder for TIFFDecoder<R>[src]
fn dimensions(&mut self) -> ImageResult<(u32, u32)>[src]
fn colortype(&mut self) -> ImageResult<ColorType>[src]
fn row_len(&mut self) -> ImageResult<usize>[src]
fn read_scanline(&mut self, _: &mut [u8]) -> ImageResult<u32>[src]
fn read_image(&mut self) -> ImageResult<DecodingResult>[src]
impl<R: Read> ImageDecoder for DXTDecoder<R>[src]
Note that, due to the way that DXT compression works, a scanline is considered to consist out of 4 lines of pixels.