API Reference
Command
New-ImageCrop
Creates a cropped version of an image using rectangular, circular or polygonal areas.
Remarks
Creates a cropped version of an image using rectangular, circular or polygonal areas.
Examples
Crop using rectangle
New-ImageCrop -FilePath in.png -OutputPath out.png -X 10 -Y 10 -Width 100 -Height 100
Crop using circle
New-ImageCrop -FilePath in.png -OutputPath out.png -CenterX 50 -CenterY 50 -Radius 25
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
New-ImageCrop -FilePath <String> [-Height <Int32>] [-Open] -OutputPath <String> [-Width <Int32>] [-X <Int32>] [-Y <Int32>] [<CommonParameters>]#Parameter set:
RectangleParameters
- FilePath String
- Path to the image being cropped.
- Height Int32
- Height of the rectangle.
- Open SwitchParameter
- Open the cropped file after creation.
- OutputPath String
- Where to save the cropped image.
- Width Int32
- Width of the rectangle.
- X Int32
- X coordinate for rectangle cropping.
- Y Int32
- Y coordinate for rectangle cropping.
New-ImageCrop [-CenterX <Single>] [-CenterY <Single>] -FilePath <String> [-Open] -OutputPath <String> [-Radius <Single>] [<CommonParameters>]#Parameter set:
CircleParameters
- CenterX Single
- X coordinate of the circle center.
- CenterY Single
- Y coordinate of the circle center.
- FilePath String
- Path to the image being cropped.
- Open SwitchParameter
- Open the cropped file after creation.
- OutputPath String
- Where to save the cropped image.
- Radius Single
- Radius of the circle.
New-ImageCrop -FilePath <String> [-Open] -OutputPath <String> [-Points <PointF[]>] [<CommonParameters>]#Parameter set:
PolygonParameters
- FilePath String
- Path to the image being cropped.
- Open SwitchParameter
- Open the cropped file after creation.
- OutputPath String
- Where to save the cropped image.
- Points PointF[]
- Points describing a polygon.