crop

fun crop(x: Int, y: Int, width: Int, height: Int): Image

Crops the image to the specified rectangle.

Return

A new Image object that is cropped.

Parameters

x

The X coordinate of the top-left corner of the crop rectangle.

y

The Y coordinate of the top-left corner of the crop rectangle.

width

The width of the crop rectangle.

height

The height of the crop rectangle.