Skip to main content

SysDecodePngFn

Type Alias SysDecodePngFn 

Source
pub type SysDecodePngFn = Option<unsafe extern "C" fn(userdata: *mut c_void, allocator: *const Allocator, data: *const u8, data_len: usize, out: *mut SysImage) -> bool>;
Expand description

Callback type for PNG decoding.

Decodes raw PNG data into RGBA pixels. The output pixel data must be allocated through the provided allocator. The library takes ownership of the buffer and will free it with the same allocator.

Aliased Type§

pub enum SysDecodePngFn {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *const Allocator, *const u8, usize, *mut SysImage) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *const Allocator, *const u8, usize, *mut SysImage) -> bool)

Some value of type T.