Project

ImagePlayground

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

Stars 101
Forks 7
Total downloads 711,982
Release ImagePlayground-PowerShellModule.v3.2.7
Language: C# Updated: 2026-10-26
Command

Save-Image

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>]
#
Parameter set: All Parameter Sets

Description

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

Examples

Overwrite the source file

Save-Image -Image $img

Save as JPEG with quality 80

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.