crop

fun crop(x: Float, y: Float, width: Float, height: Float): 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.