MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / liq_image_create_rgba_rows

Function liq_image_create_rgba_rows

imagequant-sys/src/ffi.rs:612–622  ·  view source on GitHub ↗
(attr: &liq_attr, rows: *const *const RGBA, width: c_uint, height: c_uint, gamma: f64)

Source from the content-addressed store, hash-verified

610#[no_mangle]
611#[inline(never)]
612pub unsafe extern "C" fn liq_image_create_rgba_rows<'rows>(attr: &liq_attr, rows: *const *const RGBA, width: c_uint, height: c_uint, gamma: f64) -> Option<Box<liq_image<'rows>>> {
613 if !check_image_size(attr, width, height) { return None; }
614 if rows.is_null() { return None; }
615 let rows = std::slice::from_raw_parts(rows, height as _);
616 liq_image_create_rgba_rows_impl(&attr.inner, rows, width as _, height as _, gamma)
617 .map(move |inner| Box::new(liq_image {
618 magic_header: LIQ_IMAGE_MAGIC,
619 inner: ManuallyDrop::new(inner),
620 c_api_free: attr.c_api_free,
621 }))
622}
623
624#[no_mangle]
625#[inline(never)]

Callers

nothing calls this directly

Calls 3

check_image_sizeFunction · 0.85
newFunction · 0.85

Tested by

no test coverage detected