DevIL Documentation Home | Previous | Next

iluEnlargeCanvas

The iluEnlargeCanvas function enlarges the image while leaving the original data unchanged.


ILboolean iluEnlargeCanvas(
  ILuint Width,
  ILuint Height,
  ILuint Depth,
  ILenum Placement
);

Parameters

Width
New image width - must be larger than the current image's width.
Height
New image height - must be larger than the current image's height.
Depth
New image depth - must be larger than the current image's depth.
Placement
Describes where to place the original image. This is independent of the origin type. This parameter can have values of:

ILU_ENLARGE_LOWER_LEFT
Places the original image's lower-left corner in the new image's lower-left corner.
ILU_ENLARGE_LOWER_RIGHT
Places the original image's lower-right corner in the new image's lower-right corner.
ILU_ENLARGE_UPPER_LEFT
Places the original image's upper-left corner in the new image's upper-left corner.
ILU_ENLARGE_UPPER_RIGHT
Places the original image's upper-right corner in the new image's upper-right corner.
ILU_ENLARGE_CENTER
Places the original image in the center of the new image.

Remarks

iluEnlargeCanvas enlarges the "canvas" of the current image, leaving the new background cleared to all zeros. Placement specifies where the original image data is to be placed in the new image.

Error Codes

ILU_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function. This error can also be used if any of the parameter dimensions are smaller than the original image's dimensions.

See Also

ilGenImages, ilBindImage