DevIL Documentation Home | Previous | Next

ilSavePal

The ilSavePal function saves the current image's palette to a file.


ILboolean ilSavePal(
  char *FileName
);

Parameters

FileName
Filename to save the palette data to.

Remarks

If the current bound image has a palette, ilSavePal saves the current image's palette to the file specified by FileName. Currently, OpenIL only supports saving to Paint Shop Pro .pal files.

Error Codes

IL_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
IL_INVALID_PARAM - FileName was NULL or contained no extension.
IL_INVALID_EXTENSION - No extension set matched FileName's extension.
IL_COULD_NOT_OPEN_FILE - Could not open FileName for writing.

See Also

ilGenImages, ilBindImage