Skip to content

MTY_CompressImage

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Compress an RGBA image.

void *MTY_CompressImage(
    MTY_ImageCompression method,
    const void *         input,
    uint32_t             width,
    uint32_t             height,
    size_t *             outputSize
);

Parameters

method (MTY_ImageCompression)

The compression method to be used on input.

input (const void *)

RGBA 8-bits per channel image data.

width (uint32_t)

The width of the input image.

height (uint32_t)

The height of the input image.

outputSize (size_t *)

Set to the size in bytes of the returned buffer.

Return value

void *

On failure, NULL is returned. Call MTY_GetLog for details.

The returned buffer must be destroyed with MTY_Free.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: Image

Clone this wiki locally