DevIL Documentation Home | Previous | Next

ilLoadPal

The ilLoadPal function loads a palette from a file.


ILboolean ilLoadPal(
  char *FileName
);


Parameters

FileName
Specifies w

Remarks

ilLoadPal simply loads a palette from the file specified by FileName into the current bound image's palette. If the current bound image is not of type IL_COLOR_INDEX, the palette is not used, but it is loaded nonetheless. ilLoadPal can load .col, Halo and Jasc PSP palette files.

Error Codes

IL_COULD_NOT_OPEN_FILE - The file pointed to by FileName could not be opened. Either the file does not exist or is in use by another process.
IL_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
IL_INVALID_PARAM - FileName was not valid. It was most likely NULL.

See Also

ilGenImages, ilBindImage, ilLoadImage