---
title: "crop method"
url: "https://reference.aspose.com/cad/python-net/aspose.cad/rasterimage/crop/"
product: "Aspose.CAD for Python via .NET API References"
---


## crop {#aspose.cad.Rectangle}

Cropping the image.



```python
def crop(self, rectangle):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| rectangle | [`Rectangle`](/cad/python-net/aspose.cad/rectangle) | The rectangle. |


## crop {#int-int-int-int}

Crop image with shifts.



```python
def crop(self, left_shift, right_shift, top_shift, bottom_shift):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| left_shift | int | The left shift. |
| right_shift | int | The right shift. |
| top_shift | int | The top shift. |
| bottom_shift | int | The bottom shift. |



### See Also
* module [`aspose.cad`](../../)
* class [`RasterImage`](/cad/python-net/aspose.cad/rasterimage)
