[][src]Struct nannou::image::webp::WebpDecoder

pub struct WebpDecoder<R> { /* fields omitted */ }

A Representation of a Webp Image format decoder.

Methods

impl<R> WebpDecoder<R> where
    R: Read
[src]

pub fn new(r: R) -> Result<WebpDecoder<R>, ImageError>[src]

Create a new WebpDecoder from the Reader r. This function takes ownership of the Reader.

Trait Implementations

impl<R> ImageDecoder for WebpDecoder<R> where
    R: Read
[src]

type Reader = Cursor<Vec<u8>>

The type of reader produced by into_reader.

fn row_bytes(&self) -> u64[src]

Returns the number of bytes in a single row of the image. All decoders will pad image rows to a byte boundary. Read more

fn total_bytes(&self) -> u64[src]

Returns the total number of bytes in the image.

fn scanline_bytes(&self) -> u64[src]

Returns the minimum number of bytes that can be efficiently read from this decoder. This may be as few as 1 or as many as total_bytes(). Read more

fn read_image_with_progress<F>(
    self,
    progress_callback: F
) -> Result<Vec<u8>, ImageError> where
    F: Fn(Progress), 
[src]

Same as read_image but periodically calls the provided callback to give updates on loading progress. Read more

Auto Trait Implementations

impl<R> Send for WebpDecoder<R> where
    R: Send

impl<R> Sync for WebpDecoder<R> where
    R: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Content for T[src]

impl<T> SafeBorrow<T> for T[src]

impl<T> Erased for T

impl<S> FromSample<S> for S[src]

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.