Function gifski::c_api::gifski_add_frame_png_file [] [src]

#[no_mangle]
pub extern "C" fn gifski_add_frame_png_file(
    handle: *mut GifskiHandle,
    index: u32,
    file_path: *const c_char,
    delay: u16
) -> GifskiError

File path must be valid UTF-8. This function is asynchronous.

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.