---
title: "Class ImageUtils | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common/ImageUtils/"
---

# Class ImageUtils

> **Inheritance:** `System.Object` -> ImageUtils

###### **Namespace**: [Aurigma.DesignAtoms.Common](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public static class ImageUtils
```

## Inherited Members

* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Methods

### GetImageExtension

```csharp
public static string GetImageExtension(FileFormat format)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Configuration.FileFormat](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Configuration/FileFormat.md) | *format* |  |

##### Returns

`System.String`

### GetImageExtension

```csharp
public static string GetImageExtension(Stream imageStream)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *imageStream* |  |

##### Returns

`System.String`

### GetImageExtension

```csharp
public static string GetImageExtension(FileInfo imageFile)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.FileInfo` | *imageFile* |  |

##### Returns

`System.String`

### GetImageSize

```csharp
public static void GetImageSize(Stream imageStream, out Size imageSize, out float horizontalResolution, out float verticalResolution)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *imageStream* |  |
| `System.Drawing.Size` | *imageSize* |  |
| `System.Single` | *horizontalResolution* |  |
| `System.Single` | *verticalResolution* |  |

### GetImageSize

```csharp
public static void GetImageSize(ISourceImageParams sourceImageParams, string sourceStorageId, int pageIndex, out Size imageSize, out float horizontalResolution, out float verticalResolution)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Storage.Models.ISourceImageParams](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.Models/ISourceImageParams.md) | *sourceImageParams* |  |
| `System.String` | *sourceStorageId* |  |
| `System.Int32` | *pageIndex* |  |
| `System.Drawing.Size` | *imageSize* |  |
| `System.Single` | *horizontalResolution* |  |
| `System.Single` | *verticalResolution* |  |

### GetImageSize

```csharp
public static void GetImageSize(IImageParams reader, out Size imageSize, out float horizontalResolution, out float verticalResolution)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.IImageParams` | *reader* |  |
| `System.Drawing.Size` | *imageSize* |  |
| `System.Single` | *horizontalResolution* |  |
| `System.Single` | *verticalResolution* |  |

### GetPageSize

```csharp
public static Size GetPageSize(IFileCacheImageParamsReader fileCacheImageParamsReader, string sourceStorageId, int pageIndex)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Storage.FileCache.IFileCacheImageParamsReader](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.FileCache/IFileCacheImageParamsReader.md) | *fileCacheImageParamsReader* |  |
| `System.String` | *sourceStorageId* |  |
| `System.Int32` | *pageIndex* |  |

##### Returns

`System.Drawing.Size`

### GetImageMimeType

```csharp
public static string GetImageMimeType(string fileName)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileName* |  |

##### Returns

`System.String`

### GetImageMimeType

```csharp
public static string GetImageMimeType(FileFormat imageFormat)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Configuration.FileFormat](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Configuration/FileFormat.md) | *imageFormat* |  |

##### Returns

`System.String`

### GetWriterSettings

```csharp
public static WriterSettings GetWriterSettings(FileFormat imageFormat)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Configuration.FileFormat](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Configuration/FileFormat.md) | *imageFormat* |  |

##### Returns

`Aurigma.GraphicsMill.Codecs.WriterSettings`

### IsSvgContainsText

```csharp
public static bool IsSvgContainsText(Stream stream)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *stream* |  |

##### Returns

`System.Boolean`

### RotateByExif

```csharp
public static Stream RotateByExif(ImageReader imageReader, ILogger logger = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.Codecs.ImageReader` | *imageReader* |  |
| `NLog.ILogger` | *logger* |  |

##### Returns

`System.IO.Stream`
