< Back

Resize-PIPImage

Sat Jan 18, 2020 6:51 pm

NAME Resize-PIPImage



SYNOPSIS

Change the size of the image.





SYNTAX

Resize-PIPImage [-InputObject] <ImageFactory> [-Width] <Int32> [-Height] <Int32> [[-ResizeMode] {Pad | Stretch |

Crop | Max | Min | BoxPad}] [[-AnchorPosition] {Center | Top | Bottom | Left | Right | TopLeft | TopRight |

BottomRight | BottomLeft}] [[-BackgroundColor] <Color>] [[-UpScale]] [<CommonParameters>]



Resize-PIPImage [-InputObject] <ImageFactory> [-Width] <Int32> [-Height] <Int32> [[-MaintainAspect]]

[<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



-Width <Int32>

The width to set the image to.



Required? true

Position? 2

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Height <Int32>

The height to set the image to.



Required? true

Position? 3

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-ResizeMode

The ImageProcessor.Imaging.ResizeMode to apply to resized image.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AnchorPosition

The ImageProcessor.Imaging.AnchorPosition to apply to resized image.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BackgroundColor <Color>

The System.Drawing.Color to set as the background color. Used primarily for image formats that do not support

transparency.



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UpScale [<SwitchParameter>]

Whether to allow up-scaling of images. (Default true)



Required? false

Position? 7

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-MaintainAspect [<SwitchParameter>]



Required? false

Position? 4

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 | Set-ImageSize -Width 200 -Height 100 -MaintainAspect















RELATED LINKS