[][src]Struct gifski::Collector

pub struct Collector { /* fields omitted */ }

Collect frames that will be encoded

Note that writing will finish only when the collector is dropped. Collect frames on another thread, or call drop(collector) before calling writer.write()!

Methods

impl Collector
[src]

pub fn add_frame_rgba(
    &mut self,
    frame_index: usize,
    image: ImgVec<RGBA8>,
    delay: u16
) -> CatResult<()>
[src]

Frame index starts at 0. Set each frame only once, but you can set them in any order. Frame delay is in GIF units (1/100s).

pub fn add_frame_png_file(
    &mut self,
    frame_index: usize,
    path: PathBuf,
    delay: u16
) -> CatResult<()>
[src]

Read and decode a PNG file from disk. Frame index starts at 0. Frame delay is in GIF units (1/100s)

Auto Trait Implementations

impl Send for Collector

impl Sync for Collector

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> SetParameter for T
[src]

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

Sets value as a parameter of self.