< Back
Invoke-PIPImageCrop
Post
NAME Invoke-PIPImageCrop
SYNOPSIS
Change the size of the image.
SYNTAX
Invoke-PIPImageCrop [-InputObject] <ImageFactory> [-Left] <Single> [-Top] <Single> [-Right] <Single> [-Botom]
<Single> [-Percentage] [<CommonParameters>]
DESCRIPTION
Change the size of the image to the either the absolute height and width
or constrained to the height and width but maintaining aspect ratio.
PARAMETERS
-InputObject <ImageFactory>
Specifies the objects to send down the pipeline. Enter a variable that contains the objects, or type a command
or
expression that gets the objects.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Left <Single>
The [System.Float] defining the left coordinate of the crop layer to offset from the original image. When the
crop
mode is defined as [CropMode.Percentage] this becomes the percentage you want to remove from the left hand
side
of the image.
Required? true
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Top <Single>
The [System.Float] defining the top coordinate of the crop layer to offset from the original image. When the
crop
mode is defined as [CropMode.Percentage] this becomes the percentage you want to remove from the top of the
image.
Required? true
Position? 3
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Right <Single>
The [System.Float] defining the width of the crop layer. When the crop mode is defined as
[CropMode.Percentage] this
becomes the percentage you want to remove from the right hand side of the image.
Required? true
Position? 4
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Botom <Single>
Required? true
Position? 5
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Percentage [<SwitchParameter>]
The default Crop Mode is Pixels. When the Percentage switch is selected this becomes the percentage you want
to
remove from the bottom of the image.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
ImageProcessor.ImageFactory
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ImageStream Capture.png | Set-ImageSize -Width 100 -Height 100
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$images dir *.png | Get-PIPImage | Invoke-PIPImageCrop -Left 10 -Top 10 -Right 10 -Bottom 10 -Percetnage
RELATED LINKS
SYNOPSIS
Change the size of the image.
SYNTAX
Invoke-PIPImageCrop [-InputObject] <ImageFactory> [-Left] <Single> [-Top] <Single> [-Right] <Single> [-Botom]
<Single> [-Percentage] [<CommonParameters>]
DESCRIPTION
Change the size of the image to the either the absolute height and width
or constrained to the height and width but maintaining aspect ratio.
PARAMETERS
-InputObject <ImageFactory>
Specifies the objects to send down the pipeline. Enter a variable that contains the objects, or type a command
or
expression that gets the objects.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Left <Single>
The [System.Float] defining the left coordinate of the crop layer to offset from the original image. When the
crop
mode is defined as [CropMode.Percentage] this becomes the percentage you want to remove from the left hand
side
of the image.
Required? true
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Top <Single>
The [System.Float] defining the top coordinate of the crop layer to offset from the original image. When the
crop
mode is defined as [CropMode.Percentage] this becomes the percentage you want to remove from the top of the
image.
Required? true
Position? 3
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Right <Single>
The [System.Float] defining the width of the crop layer. When the crop mode is defined as
[CropMode.Percentage] this
becomes the percentage you want to remove from the right hand side of the image.
Required? true
Position? 4
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Botom <Single>
Required? true
Position? 5
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Percentage [<SwitchParameter>]
The default Crop Mode is Pixels. When the Percentage switch is selected this becomes the percentage you want
to
remove from the bottom of the image.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
ImageProcessor.ImageFactory
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ImageStream Capture.png | Set-ImageSize -Width 100 -Height 100
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$images dir *.png | Get-PIPImage | Invoke-PIPImageCrop -Left 10 -Top 10 -Right 10 -Bottom 10 -Percetnage
RELATED LINKS