Function gifski::c_api::gifski_add_frame_rgba [] [src]

#[no_mangle]
pub extern "C" fn gifski_add_frame_rgba(
    handle: *mut GifskiHandle,
    index: u32,
    width: u32,
    height: u32,
    pixels: *const RGBA8,
    delay: u16
) -> GifskiError

Pixels is an array width×height×4 bytes large. The array is copied, so you can free/reuse it immediately.

Delay is in 1/100ths of a second.

While you add frames, gifski_write() should be running already on another thread. If gifski_write() is not running already, it may make gifski_add_frame_* block and wait for write to start.

Call gifski_end_adding_frames() after you add all frames.

Returns 0 (GIFSKI_OK) on success, and non-0 GIFSKI_* constant on error.