|DevIL Documentation||Home | Previous | Next|
The ilSaveImage function save the current image to a file.
ILboolean ilSaveImage( char *FileName );
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").
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.
ilGenImages, ilBindImage, ilLoadImage, ilSave, ilLoad, ilLoadF, ilLoadL