Function imagequant_sys::liq_quantize_image
[−]
[src]
pub unsafe extern "C" fn liq_quantize_image(
options: &liq_attr,
input_image: &liq_image
) -> *mut liq_result
Performs quantization (palette generation) based on settings in attr (from liq_attr_create()) and pixels of the image.
Returns LIQ_OK if quantization succeeds and sets liq_result pointer in out_result. The last argument is used for receiving the result object:
liq_result *result; if (LIQ_OK == liq_image_quantize(img, attr, &result)) { // Note &result // result pointer is valid here }
Returns LIQ_QUALITY_TOO_LOW if quantization fails due to limit set in liq_set_quality().
See liq_write_remapped_image().
If you want to generate one palette for multiple images at once, see liq_histogram_create().