DevIL Documentation Previous | IL | Next

 

ilLoadPal

 

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.

 

ILboolean ilLoadPal(
  char * FileName );


Parameters

 
FileName
Filename to load the palette data from.


Errors

 
IL_COULD_NOT_OPEN_FILE
Could not open FileName for writing.
IL_ILLEGAL_OPERATION
The operation attempted is not allowable in the current state. The function returns with no ill side effects. Generally there is currently no image bound or it has been deleted via ilDeleteImages. You should use ilGenImages and ilBindImage before calling the function.
IL_INVALID_PARAM
FileName or Type was NULL.
IL_OUT_OF_MEMORY
Could not allocate enough memory for the image data.

See Also

 
ilBindImage, ilGenImages, ilLoadImage,