[−][src]Struct gifski::Collector
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()
!
Implementations
impl Collector
[src]
pub fn add_frame_rgba(
&mut self,
frame_index: usize,
image: ImgVec<RGBA8>,
presentation_timestamp: f64
) -> CatResult<()>
[src]
&mut self,
frame_index: usize,
image: ImgVec<RGBA8>,
presentation_timestamp: f64
) -> CatResult<()>
Frame index starts at 0.
Set each frame (index) only once, but you can set them in any order.
Presentation timestamp is time in seconds (since file start at 0) when this frame is to be displayed.
If the first frame doesn't start at pts=0, the delay will be used for the last frame.
pub fn add_frame_png_file(
&mut self,
frame_index: usize,
path: PathBuf,
presentation_timestamp: f64
) -> CatResult<()>
[src]
&mut self,
frame_index: usize,
path: PathBuf,
presentation_timestamp: f64
) -> CatResult<()>
Read and decode a PNG file from disk.
Frame index starts at 0.
Presentation timestamp is time in seconds (since file start at 0) when this frame is to be displayed.
If the first frame doesn't start at pts=0, the delay will be used for the last frame.
Auto Trait Implementations
impl RefUnwindSafe for Collector
impl Send for Collector
impl Sync for Collector
impl Unpin for Collector
impl UnwindSafe for Collector
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,