## Load(Stream) {#load}

Loads a new image from the specified stream.

```csharp
public static Image Load(Stream stream)
```

| Parameter | Type | Description |
| --- | --- | --- |
| stream | Stream | The stream to load image from. |

### Return Value

The loaded drawing.

## Examples

Loads a drawing to process from corresponding stream

```csharp
using (var image = Aspose.CAD.Image.Load(File.OpenRead("fileName.dwg"))
{
    // process the drawing
}
```

### See Also

* class [Image](../)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

---

## Load(string) {#load_1}

Loads a new image from the specified file.

```csharp
public static Image Load(string filePath)
```

| Parameter | Type | Description |
| --- | --- | --- |
| filePath | String | The file path to load image from. |

### Return Value

The loaded drawing.

## Examples

Loads a drawing to process

```csharp
using (var image = Aspose.CAD.Image.Load("fileName.dwg"))
{
    // process the drawing
}
```

### See Also

* class [Image](../)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

---

## Load(Stream, LoadOptions) {#load_2}

Loads a new image from the specified stream.

```csharp
public static Image Load(Stream stream, LoadOptions loadOptions)
```

| Parameter | Type | Description |
| --- | --- | --- |
| stream | Stream | The stream to load image from. |
| loadOptions | LoadOptions | The load options. |

### Return Value

The loaded drawing.

## Examples

Loads a drawing to process from corresponding stream and unloads all related resources when dispose is called

```csharp
using (var image = Aspose.CAD.Image.Load(File.OpenRead("fileName.dwg"), new LoadOptions
{
    UnloadOnDispose = true
}))
{
    // process the drawing
}
```

### See Also

* class [Image](../)
* class [LoadOptions](../../loadoptions/)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

---

## Load(string, LoadOptions) {#load_3}

Loads a new image from the specified file.

```csharp
public static Image Load(string filePath, LoadOptions loadOptions)
```

| Parameter | Type | Description |
| --- | --- | --- |
| filePath | String | The file path to load image from. |
| loadOptions | LoadOptions | The load options. |

### Return Value

The loaded drawing.

## Examples

Loads a drawing to process and unloads all related resources when dispose is called

```csharp
using (var image = Aspose.CAD.Image.Load("fileName.dwg", new LoadOptions
{
    UnloadOnDispose = true
}))
{
    // process the drawing
}
```

### See Also

* class [Image](../)
* class [LoadOptions](../../loadoptions/)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

---

## Load(Stream, string, LoadOptions) {#load_4}

Loads a new image from the specified stream.

```csharp
public static Image Load(Stream stream, string fileName, LoadOptions loadOptions = null)
```

| Parameter | Type | Description |
| --- | --- | --- |
| stream | Stream | The stream to load image from. |
| fileName | String | The file name. |
| loadOptions | LoadOptions | The load options. |

### Return Value

The loaded drawing.

## Examples

Loads a drawing to process from corresponding stream

```csharp
string filePath = "C:\\fileName.dgn";
string fileName = "fileName.dgn";
var ms = new MemoryStream(File.ReadAllBytes(filePath);
var image = Image.Load(ms, fileName)
    // process the drawing
```

### See Also

* class [Image](../)
* class [LoadOptions](../../loadoptions/)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

