| DevIL Documentation | Home | Previous | Next |
The ilConvertImage function converts an image from one format to another.
ILboolean ilConvertImage(
ILenum DestFormat
);
ilConvertImage converts the current bound image from its format to DestFormat. Almost all conversions are allowable, except for conversions to IL_COLOR_INDEX images. ilConvertImage automatically assumes right now that all images loaded are of type IL_UNSIGNED_BYTE.
IL_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
IL_INVALID_CONVERSION - The current image uses greater than 32 bits per pixel, or DestFormat was an invalid identifier.
IL_OUT_OF_MEMORY - Could not allocate memory for the converted image data.
ilGenImages, ilBindImage, ilGetBoolean, ilGetBooleanv, ilGetInteger, ilGetIntegerv, ilConvertPal