# Save-Image

Saves an image to disk or returns its encoded bytes as a stream.

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`

Saves an image to disk or returns its encoded bytes as a stream.

## Syntax

```
Save-Image
[-AsStream]
[-CompressionLevel <Int32>]
[[-FilePath] <String>]
[-Image] <Image>
[-Open]
[-Quality <Int32>]
[<CommonParameters>]
```

[#](#method-save-image-switchparameter-int32-string-image-switchparameter-int32)

Parameter set: `All Parameter Sets`

## Description

Use this cmdlet to persist an Image instance after applying transformations.

## Examples

### Overwrite the source file

```powershell
Save-Image -Image $img
```

### Save as JPEG with quality 80

```powershell
Save-Image -Image $img -FilePath out.jpg -Quality 80
```

## Parameters

**-AsStream SwitchParameter optional**

When used without FilePath, the cmdlet writes a stream object to the pipeline.

**-CompressionLevel Int32 optional**

Compression level for PNG images.

**-FilePath String optionalposition: 1pipeline: True (ByValue)**

When omitted, the image is saved using the path already associated with the image object.

**-Image Image requiredposition: 0**

Image object to save.

**-Open SwitchParameter optional**

Open file after saving.

**-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:E748EDA9087148E4F4ABFCE71B86DCFB0437838C209D0310A20822D7B13D8699 -->
