Arguments:

A pointer to a buffer to store the converted data. This may point to a different buffer, or it can point to the same buffer as src, as long as you've ensured that the source buffer is large enough to store the converted data (the IMG_FMT_BPL() macro can help you with this).

Library:

Description:

This function converts data from one image format to another. The conversion may be done from one buffer to another, or in place.

The neither the destination nor the source formats can be a palette-based format (for example IMG_FMT_PAL8 or IMG_FMT_PAL4). Both must be direct formats. See img_expand_getfunc() to convert a palette-based image to a direct format.

If you're repeatedly converting data, it's better to call img_convert_getfunc() to get the conversion function, and then call the conversion function as required.