---
id: "M:cAlgo.API.Image.#ctor"
kind: "constructor"
type: "T:cAlgo.API.Image"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Image/Constructor/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Image constructor

Member of [Image](https://help.ctrader.com/ctrader-algo/references/Controls/Image/index.md).

## Image()

Initializes a new instance of the Image class.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public Image()
```

Python:

```python
Image()
```

### Examples

C#:

```csharp
var image = new Image { Width = 32, Height = 32 };
image.Source = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#2F4BFF'/></svg>");
Chart.AddControl(image);
```

Python:

```python
image = Image()
image.Width = 32
image.Height = 32
image.Source = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#2F4BFF'/></svg>")
api.Chart.AddControl(image)
```

