Struct nannou::image::codecs::png::PngDecoder[][src]

pub struct PngDecoder<R> where
    R: Read
{ /* fields omitted */ }

PNG decoder

Implementations

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

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

Creates a new decoder that decodes from the stream r

pub fn apng(self) -> ApngDecoder<R>[src]

Turn this into an iterator over the animation frames.

Reading the complete animation requires more memory than reading the data from the IDAT frame–multiple frame buffers need to be reserved at the same time. We further do not support compositing 16-bit colors. In any case this would be lossy as the interface of animation decoders does not support 16-bit colors.

If something is not supported or a limit is violated then the decoding step that requires them will fail and an error will be returned instead of the frame. No further frames will be returned.

pub fn is_apng(&self) -> bool[src]

Returns if the image contains an animation.

Note that the file itself decides if the default image is considered to be part of the animation. When it is not the common interpretation is to use it as a thumbnail.

If a non-animated image is converted into an ApngDecoder then its iterator is empty.

Trait Implementations

impl<'a, R> ImageDecoder<'a> for PngDecoder<R> where
    R: 'a + Read
[src]

type Reader = PngReader<R>

The type of reader produced by into_reader.

Auto Trait Implementations

impl<R> RefUnwindSafe for PngDecoder<R> where
    R: RefUnwindSafe

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

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

impl<R> Unpin for PngDecoder<R> where
    R: Unpin

impl<R> UnwindSafe for PngDecoder<R> where
    R: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

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

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

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

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

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

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SetParameter for T

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> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,