Skip to content

Latest commit

 

History

History
265 lines (211 loc) · 4.8 KB

Add-ImageText.md

File metadata and controls

265 lines (211 loc) · 4.8 KB
external help file ImagePlayground-help.xml
Module Name ImagePlayground
online version https://github.com/EvotecIT/ImagePlayground
schema 2.0.0

Add-ImageText

SYNOPSIS

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

SYNTAX

__AllParameterSets

Add-ImageText [-FilePath] <string> [-OutputPath] <string> [-Text] <string> [-X] <float> [-Y] <float> [-Color <OfficeColor>] [-FontSize <float>] [-FontFamily <string>] [-ShadowColor <OfficeColor>] [-ShadowOffsetX <float>] [-ShadowOffsetY <float>] [-OutlineColor <OfficeColor>] [-OutlineWidth <float>] [<CommonParameters>]

DESCRIPTION

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

EXAMPLES

EXAMPLE 1

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

EXAMPLE 2

$img = Get-Image -FilePath in.png
try {
    $img.AddText(10, 10, 'Sample', [OfficeIMO.Drawing.OfficeColor]::Black, 24)
    Save-Image -Image $img -FilePath out.png
} finally {
    $img.Dispose()
}

PARAMETERS

-Color

Text color.

Type: OfficeColor
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath

Source image path.

Type: String
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-FontFamily

Font family.

Type: String
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FontSize

Font size.

Type: Single
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutlineColor

Outline color.

Type: OfficeColor
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutlineWidth

Outline width.

Type: Single
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputPath

Destination image path.

Type: String
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShadowColor

Color of shadow.

Type: OfficeColor
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShadowOffsetX

X offset for shadow.

Type: Single
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShadowOffsetY

Y offset for shadow.

Type: Single
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Text

Text to add.

Type: String
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-X

X coordinate.

Type: Single
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Y

Y coordinate.

Type: Single
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • System.String

OUTPUTS

  • None

RELATED LINKS

  • None