DevIL Documentation Previous | IL | Next

 

ilTexImage

 

Any current image data is destroyed by ilTexImage and replaced by a new image with the attributes specified. The new image data has undefined values. To set the new image data to a certain value, use ilClearImage or ilClearImageTo.

 

ILboolean ilTexImage(
  ILuint Width, ILuint Height, ILuint Depth, ILubyte numberOfChannels, ILenum Format, ILenum Type, ILvoid * Data );


Parameters

 
Width
Specifies the new image width. This cannot be 0.
Height
Specifies the new image height. This cannot be 0.
Depth
Specifies the new image depth. Anything greater than 1 will make the image 3d. This cannot be 0.
numberOfChannels
Specifies the new channels. Common values are 3 and 4.
Format
Specifies the data format this image has. For a list of values this can be, see the See Also section.
Type
Specifies the data format this image has. For a list of values this can be, see the See Also section.
Data
Specifies data that should be copied to the new image. If this parameter is NULL, no data is copied, and the new image data consists of undefined values.


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_PARAM
One of the parameters provided was invalid. Width, Height, Depth or Bpp was an incorrect 0.
IL_OUT_OF_MEMORY
Could not allocate enough memory for the image data.

See Also

 
Data Formats, Data Types, ilBindImage, ilGenImages,