DevIL Documentation Home | Previous | Next

ilSaveImage

The ilSaveImage function save the current image to a file.


ILboolean ilSaveImage(
  char *FileName
);

Parameters

FileName
Specifies which file to save an image to.

Remarks

The ilSaveImage function allows a general interface to the specific internal file saving routines. Based on the extension, OpenIL will save that type of file (e.g. Targa file saved when the extension is "tga").

Error Codes

IL_COULD_NOT_OPEN_FILE - The file pointed to by FileName could not be opened for writing.
IL_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
IL_INVALID_EXTENSION - The file could not be saved based on FileName's extension.
IL_INVALID_PARAM - FileName was not valid. It was most likely NULL.

See Also

ilGenImages, ilBindImage, ilLoadImage, ilSave, ilLoad, ilLoadF, ilLoadL