DevIL Documentation Previous | IL | Next

 

ilConvertImage

 

ilConvertImage converts the current bound image from its format/type to DestFormat and DestType. Almost all conversions are allowable.

 

ILboolean ilConvertImage(
  ILenum DestFormat, ILenum DestType );


Parameters

 
DestFormat
The format the current image should be converted to.
DestType
The type the current image should be converted to.


Formats

 
IL_BGR
IL_BGRA
IL_COLOUR_INDEX
IL_LUMINANCE
IL_LUMINANCE_ALPHA
IL_RGB
IL_RGBA

Types

 
IL_BYTE
IL_DOUBLE
IL_FLOAT
IL_INT
IL_SHORT
IL_UNSIGNED_BYTE
IL_UNSIGNED_INT
IL_UNSIGNED_SHORT

Errors

 
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_CONVERSION
DestFormat and/or DestType was an invalid identifier.
IL_OUT_OF_MEMORY
Could not allocate memory for the converted image data.

See Also

 
ilBindImage, ilConvertPal, ilGenImages, ilGetBoolean, ilGetBooleanv, ilGetInteger, ilGetIntegerv,