DevIL Documentation Home | Previous | Next

ilConvertPal

The ilConvertPal function converts an image's palette from one format to another.


ILboolean ilConvertPal(
  ILenum DestFormat
);

Parameters

DestFormat
The format the current image palette should be converted to. Values accepted for DestFormat include:
IL_PAL_RGB24
IL_PAL_RGB32
IL_PAL_RGBA32
IL_PAL_BGR24
IL_PAL_BGR32
IL_PAL_BGRA32

Remarks

ilConvertPal converts the current bound image's palette from its format to DestFormat. The only palette formats not supported yet are IL_PAL_RGB16_TGA and IL_PAL_BGR16_TGA.

Error Codes

IL_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
IL_OUT_OF_MEMORY - Could not allocate memory for the new image palette.

See Also

ilGenImages, ilBindImage, ilConvertImage