# ConvertTo-Image

Converts an image to a different format. Review available syntax, parameters, pipeline guidance, and reference details in ImagePlayground API Reference.

Project

ImagePlayground

Automate image processing, codes, metadata, charts, topology, and visual stories from PowerShell.

[View on GitHub](https://github.com/EvotecIT/ImagePlayground) [Visit Website](#) [Releases](https://github.com/EvotecIT/ImagePlayground/releases) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/ImagePlayground)

Stars **102**

Forks **7**

Open issues 

Total downloads **708,853**

Release **ImagePlayground-PowerShellModule.v3.2.7**

Language: C# Updated: 2026-11-18

Command 

**Module**

`ImagePlayground`

**Inputs**

`System.String`

Converts an image to a different format.

## Syntax

```
ConvertTo-Image
[-CompressionLevel <Int32>]
[-FilePath] <String>
[-OutputPath] <String>
[-Quality <Int32>]
[<CommonParameters>]
```

[#](#method-convertto-image-int32-string-string-int32)

Parameter set: `All Parameter Sets`

## Description

Outputs a new file using the extension from OutputPath.

When OutputPath ends with .ico, the file is only copied if the source file is also an icon.

## Examples

### Convert PNG to JPEG

```powershell
ConvertTo-Image -FilePath image.png -OutputPath image.jpg -Quality 85
```

### Convert JPEG to PNG

```powershell
ConvertTo-Image -FilePath photo.jpg -OutputPath photo.png -CompressionLevel 6
```

## Parameters

**-CompressionLevel Int32 optional**

Compression level for PNG images.

**-FilePath String requiredposition: 0pipeline: True (ByValue)**

The file must exist.

**-OutputPath String requiredposition: 1**

The extension determines the output format.

**-Quality Int32 optional**

Quality for JPEG or WEBP images.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:49C66322F3B021C37C280B478A64CA6259F62434203EB3B4CC082942DC317AEB -->
