DevIL Documentation | Home | Previous | Next |
The iluCrop function "crops" the current image to a different size.
ILboolean iluCrop(
ILuint XOff,
ILuint YOff,
ILuint ZOff,
ILuint Width,
ILuint Height,
ILuint Depth
);
iluCrop "crops" the current image to new dimensions. The new image appears the same as the original, but portions of the image are clipped-off, depending on the values of the parameters of these functions. If XOff + Width, YOff + Height or ZOff + Depth is larger than the current image's dimensions, ILU_ILLEGAL_OPERATION is set.
ILU_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
ILU_OUT_OF_MEMORY - Could not allocate memory for the new image data.
ILU_ILLEGAL_OPERATION - XOff + Width, YOff + Height, or ZOff + Depth is greater than the current image's dimensions.