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,

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

fn borrow_mut(&mut self) -> &mut T

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

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for WebPDecoder<R>

impl<T> Pointable for WebPDecoder<R>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

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

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

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>