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
- YAML
- JSON
- XML
height: 0
width: 0
x: 0
y: 0
{
"height": 0,
"width": 0,
"x": 0,
"y": 0
}
<crop>
<height>0</height>
<width>0</width>
<x>0</x>
<y>0</y>
</crop>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
height | integer | No | - |
width | integer | No | - |
x | integer | No | 0 |
y | integer | No | 0 |
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.