|
The ilLoadImage function allows a general interface to the specific internal file-loading routines. The approach ilLoadImage takes toward determining image types is three-pronged. First, it finds the extension and checks to see if any user-registered functions (registered through ilRegisterLoad) match the extension. If nothing matches, it takes the extension and determines which function to call based on it. Lastly, it attempts to identify the image based on various image header verification functions, such as ilIsValidPngF. If all this checking fails, IL_FALSE is returned with no modification to the current bound image.
| ILboolean ilLoadImage( char * FileName );
|
Parameters | - FileName
- Specifies which file to load an image from.
|
Errors | - IL_COULD_NOT_OPEN_FILE
- The file pointed to by FileName could not be opened. Either the file does not exist or may be in use by another process.
- 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_EXTENSION
- The file could not be loaded based on extension or header.
- IL_INVALID_PARAM
- FileName was not valid. It was most likely NULL.
- IL_OUT_OF_MEMORY
- Could not allocate enough memory for the image data.
|
See Also
|