Project

ImagePlayground

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

Stars 100
Forks 7
Total downloads 712,347
Release ImagePlayground-PowerShellModule.v3.2.7
Language: C# Updated: 2026-08-25

API Reference

Command

Save-Image

Namespace ImagePlayground
Inputs
System.String

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

Remarks

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

Examples

Authored help example

Overwrite the source file

PS>


Save-Image -Image $img
        

Save as JPEG with quality 80

PS>


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

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.

Syntax

Save-Image [-AsStream] [-CompressionLevel <Int32>] [-FilePath <String>] -Image <Image> [-Open] [-Quality <Int32>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AsStream SwitchParameter optionalposition: namedpipeline: False
When used without FilePath, the cmdlet writes a stream object to the pipeline.
CompressionLevel Int32 optionalposition: namedpipeline: False
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: 0pipeline: False
Image object to save.
Open SwitchParameter optionalposition: namedpipeline: False
Open file after saving.
Quality Int32 optionalposition: namedpipeline: False
Quality for JPEG or WEBP images.