Struct image::ico::ICODecoder
source · pub struct ICODecoder<R: Read> { /* private fields */ }
Expand description
An ico decoder
Implementations
sourceimpl<R: Read + Seek> ICODecoder<R>
impl<R: Read + Seek> ICODecoder<R>
sourcepub fn new(r: R) -> ImageResult<ICODecoder<R>>
pub fn new(r: R) -> ImageResult<ICODecoder<R>>
Create a new decoder that decodes from the stream r
Trait Implementations
sourceimpl<R: Read + Seek> ImageDecoder for ICODecoder<R>
impl<R: Read + Seek> ImageDecoder for ICODecoder<R>
sourcefn dimensions(&mut self) -> ImageResult<(u32, u32)>
fn dimensions(&mut self) -> ImageResult<(u32, u32)>
Returns a tuple containing the width and height of the image
sourcefn colortype(&mut self) -> ImageResult<ColorType>
fn colortype(&mut self) -> ImageResult<ColorType>
Returns the color type of the image e.g. RGB(8) (8bit RGB)
sourcefn row_len(&mut self) -> ImageResult<usize>
fn row_len(&mut self) -> ImageResult<usize>
Returns the length in bytes of one decoded row of the image
sourcefn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>
fn read_scanline(&mut self, buf: &mut [u8]) -> ImageResult<u32>
Reads one row from the image into
buf
and returns the row indexsourcefn read_image(&mut self) -> ImageResult<DecodingResult>
fn read_image(&mut self) -> ImageResult<DecodingResult>
Decodes the entire image and return it as a Vector
sourcefn is_animated(&mut self) -> ImageResult<bool>
fn is_animated(&mut self) -> ImageResult<bool>
Returns true if the image is animated
sourcefn into_frames(self) -> ImageResult<Frames>
fn into_frames(self) -> ImageResult<Frames>
Returns the frames of the image Read more
Auto Trait Implementations
impl<R> RefUnwindSafe for ICODecoder<R>where
R: RefUnwindSafe,
impl<R> Send for ICODecoder<R>where
R: Send,
impl<R> Sync for ICODecoder<R>where
R: Sync,
impl<R> Unpin for ICODecoder<R>where
R: Unpin,
impl<R> UnwindSafe for ICODecoder<R>where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more