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

Add-ImageText

Module
ImagePlayground
Inputs
System.String

Adds text to an image at the provided coordinates and writes the updated image to disk.

Syntax

Add-ImageText
[-Color <Color>]
[-FilePath] <String>
[-FontFamily <String>]
[-FontSize <Single>]
[-OutlineColor <Color>]
[-OutlineWidth <Single>]
[-OutputPath] <String>
[-ShadowColor <Color>]
[-ShadowOffsetX <Single>]
[-ShadowOffsetY <Single>]
[-Text] <String>
[-X] <Single>
[-Y] <Single>
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Add watermark text

Add-ImageText -FilePath in.png -OutputPath out.png -Text "Sample" -X 10 -Y 10

Draw text using ImageSharp

using SixLabors.ImageSharp;
using SixLabors.ImageSharp.ColorSpaces;
using var img = Image.Load("in.png");
img.AddText(10, 10, "Sample", Color.Black, 24);
img.Save("out.png");

Parameters

-Color Color optional
Text color.
-FilePath String requiredposition: 0pipeline: True (ByValue)
Source image path.
-FontFamily String optional
Font family.
-FontSize Single optional
Font size.
-OutlineColor Color optional
Outline color.
-OutlineWidth Single optional
Outline width.
-OutputPath String requiredposition: 1
Destination image path.
-ShadowColor Color optional
Color of shadow.
-ShadowOffsetX Single optional
X offset for shadow.
-ShadowOffsetY Single optional
Y offset for shadow.
-Text String requiredposition: 2
Text to add.
-X Single requiredposition: 3
X coordinate.
-Y Single requiredposition: 4
Y coordinate.

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.