---
title: "CadRasterImageDef constructor"
url: "https://reference.aspose.com/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cadrasterimagedef/__init__/"
product: "Aspose.CAD for Python via .NET API References"
---


## __init__ {#str-int-int}

Initializes a new instance of the [`CadRasterImageDef`](/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cadrasterimagedef) class.



```python
def __init__(self, file_name_of_image, image_size_u, image_size_v):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| file_name_of_image | str | File name of image. |
| image_size_u | int | Image size in pixels. DXF: U value. |
| image_size_v | int | Image size in pixels. DXF: V value. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentException | Thrown when fileNameOfImage is null or empty |
| ArgumentOutOfRangeException | Thrown when imageSizeU or imageSizeV is less or equal than 0 |





### See Also
* module [`aspose.cad.fileformats.cad.cadobjects`](../../)
* class [`CadRasterImageDef`](/cad/python-net/aspose.cad.fileformats.cad.cadobjects/cadrasterimagedef)
