Skip to main content

Crop

Cropping dimensions (x, y, width, height) for an image transformation.

Notesโ€‹

Defines the region of the image to keep: x and y give its top-left corner, width and height its size. Everything outside that rectangle is discarded.

Cropping is applied last, after scaling and rotation, so the coordinates refer to the image as those steps left it.

Usageโ€‹

height: 0
width: 0
x: 0
y: 0

Propertiesโ€‹

PropertyTypeRequiredDefault
heightintegerNo-
widthintegerNo-
xintegerNo0
yintegerNo0

Property Detailsโ€‹

heightโ€‹

Height of the region to keep, in pixels. If only one of height and width is set, the same value is used for both, giving a square.

widthโ€‹

Width of the region to keep, in pixels. If only one of height and width is set, the same value is used for both, giving a square.

xโ€‹

Distance in pixels from the left edge of the image to the left edge of the region to keep. Defaults to 0.

yโ€‹

Distance in pixels from the top of the image to the top of the region to keep. Defaults to 0.