
## create_image_data {#aspose.html.dom.canvas.IImageData}

Creates a new, blank ImageData object with the specified dimensions. 
All of the pixels in the new object are transparent black.


### Returns 


A new ImageData object with the specified width and height. The new object is filled with transparent black pixels.


```python
def create_image_data(self, imagedata):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| imagedata | [`IImageData`](/html/python-net/aspose.html.dom.canvas/iimagedata) | An existing ImageData object from which to copy the width and height. The image itself is not copied. |


## create_image_data {#float-float}

Creates a new, blank ImageData object with the specified dimensions. 
All of the pixels in the new object are transparent black.


### Returns 


A new ImageData object with the specified width and height. The new object is filled with transparent black pixels.


```python
def create_image_data(self, sw, sh):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| sw | float | The width to give the new ImageData object. |
| sh | float | The height to give the new ImageData object. |



### See Also
* module [`aspose.html.dom.canvas`](../../)
* class [`ICanvasRenderingContext2D`](/html/python-net/aspose.html.dom.canvas/icanvasrenderingcontext2d)
