Struct WebPDecoder

pub struct WebPDecoder<R> { /* private fields */ }

WebP Image format decoder.

Supports both lossless and lossy WebP images.

Implementations

impl<R: BufRead + Seek> WebPDecoder<R>

fn new(r: R) -> ImageResult<Self>

Create a new WebPDecoder from the Reader r.

fn has_animation(&self) -> bool

Returns true if the image as described by the bitstream is animated.

fn set_background_color(&mut self, color: Rgba<u8>) -> ImageResult<()>

Sets the background color if the image is an extended and animated webp.

Trait Implementations

impl<'a, R: 'a + BufRead + Seek> AnimationDecoder<'a> for WebPDecoder<R>

fn loop_count(&self) -> LoopCount
fn into_frames(self) -> Frames<'a>

impl<R: BufRead + Seek> ImageDecoder for WebPDecoder<R>

fn dimensions(&self) -> (u32, u32)
fn color_type(&self) -> ColorType
fn read_image(self, buf: &mut [u8]) -> ImageResult<()>
fn read_image_boxed(self: Box<Self>, buf: &mut [u8]) -> ImageResult<()>
fn icc_profile(&mut self) -> ImageResult<Option<Vec<u8>>>
fn exif_metadata(&mut self) -> ImageResult<Option<Vec<u8>>>
fn xmp_metadata(&mut self) -> ImageResult<Option<Vec<u8>>>
fn orientation(&mut self) -> ImageResult<Orientation>

Auto Trait Implementations

impl<R> Freeze for WebPDecoder<R> where WebPDecoder<R>: Freeze,

impl<R> RefUnwindSafe for WebPDecoder<R> where WebPDecoder<R>: RefUnwindSafe,

impl<R> Send for WebPDecoder<R> where WebPDecoder<R>: Send,

impl<R> Sync for WebPDecoder<R> where WebPDecoder<R>: Sync,

impl<R> Unpin for WebPDecoder<R> where WebPDecoder<R>: Unpin,

impl<R> UnsafeUnpin for WebPDecoder<R> where WebPDecoder<R>: UnsafeUnpin,

impl<R> UnwindSafe for WebPDecoder<R> where WebPDecoder<R>: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for WebPDecoder<R> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for WebPDecoder<R> where ST: ?Sized, DT: ?Sized,

impl<T> Any for WebPDecoder<R> where T: 'static + ?Sized,

impl<T> Borrow<T> for WebPDecoder<R> where T: ?Sized,

impl<T> BorrowMut<T> for WebPDecoder<R> where T: ?Sized,

impl<T> From<T> for WebPDecoder<R>

impl<T> IntoEither for WebPDecoder<R>

impl<T> Pointable for WebPDecoder<R>

impl<T> Read<Exclusive, BecauseExclusive> for WebPDecoder<R> where T: ?Sized,

impl<T, U> Into<U> for WebPDecoder<R> where U: From<T>,

impl<T, U> TryFrom<U> for WebPDecoder<R> where U: Into<T>,

impl<T, U> TryInto<U> for WebPDecoder<R> where U: TryFrom<T>,