DevIL Documentation Home | Previous | Next

iluGetImageInfo

The iluGetImageInfo function retrieves information about the current image in an easy format.


ILvoid iluGetImageInfo(
  ILinfo *Info
);

Parameters

Info
ILinfo struct to receive the image information.

Remarks

The iluGetImageInfo function retrieves information about the current image in an ILinfo struct. This is useful when you are repeatedly calling ilGetInteger and is more efficient in this case. The ILinfo struct is described below:

typedef struct ILinfo
{

ILuint   Width; // the image's width
ILuint   Height; // the image's height
ILuint   Depth; // the image's depth
ILubyte Bpp; // bytes per pixel (not bits) of the image
ILuint   SizeOfData; // the total size of the data (in bytes)
ILenum Format; // image format (in IL enum style)
ILenum Type; // image type (in IL enum style)
ILenum Origin; // origin of the image
ILenum PalType; // palette type
ILuint   PalSize; // palette size
ILuint   NumNext; // number of images following
ILuint   NumMips; // number of mipmaps
ILuint   NumLayers; // number of layers
} ILinfo;

Error Codes

ILU_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function. This error is also produced when Info is NULL.

See Also

ilGetBoolean, ilGetBooleanv, ilGetInteger, ilGetIntegerv