Struct image::webp::WebpDecoder
[−]
[src]
pub struct WebpDecoder<R> { /* fields omitted */ }
A Representation of a Webp Image format decoder.
Methods
impl<R: Read> WebpDecoder<R>
[src]
fn new(r: R) -> WebpDecoder<R>
Create a new WebpDecoder from the Reader r
.
This function takes ownership of the Reader.
Trait Implementations
impl<R: Read> ImageDecoder for WebpDecoder<R>
[src]
fn dimensions(&mut self) -> ImageResult<(u32, u32)>
Returns a tuple containing the width and height of the image
fn colortype(&mut self) -> ImageResult<ColorType>
Returns the color type of the image e.g. RGB(8) (8bit RGB)
fn row_len(&mut self) -> ImageResult<usize>
Returns the length in bytes of one decoded row of the image
fn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>
Reads one row from the image into buf
and returns the row index
fn read_image(&mut self) -> ImageResult<DecodingResult>
Decodes the entire image and return it as a Vector
fn is_animated(&mut self) -> ImageResult<bool>
Returns true if the image is animated
fn into_frames(self) -> ImageResult<Frames>
Returns the frames of the image Read more
fn load_rect(&mut self,
x: u32,
y: u32,
length: u32,
width: u32)
-> ImageResult<Vec<u8>>
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
Read more