ImageCrop

Crops an image to a specified rectangular area.

ImageCrop( image, x, y, width, height )

Returns: void

Argument Description
image
any, required

The image on which this operation is performed.

Alias: name

x
number, required

The X origin of the crop area.

y
number, required

The Y origin of the crop area.

width
number, required

The width of the crop area.

height
number, required

The height of the crop area.

Examples

img=imageRead("https://avatars1.githubusercontent.com/u/10973141?s=280&v=4")
imageCrop(img,50,10,100,100);
cfimage(action="writeToBrowser", source=img);

See also