image.crop()

Crops a image to a specified rectangular area.

image.crop( x, y, width, height )

Returns: void

Argument Description
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://dev.lucee.org/uploads/default/original/2X/1/140e7bb0f8069e4f7f073b6d01f55c496bbd42e3.png");
	img.Crop(50,40,100,100);
	cfimage(action="writeToBrowser", source=img);

See also