Command
New-ImageCrop
Creates a cropped version of an image using rectangular, circular or polygonal areas.
Syntax
New-ImageCrop
[-FilePath] <String>
[-Height <Int32>]
[-Open]
[-OutputPath] <String>
[-Width <Int32>]
[-X <Int32>]
[-Y <Int32>]
[<CommonParameters>]#Parameter set:
RectangleNew-ImageCrop
[-CenterX <Single>]
[-CenterY <Single>]
[-FilePath] <String>
[-Open]
[-OutputPath] <String>
[-Radius <Single>]
[<CommonParameters>]#Parameter set:
CircleNew-ImageCrop
[-FilePath] <String>
[-Open]
[-OutputPath] <String>
[-Points <PointF[]>]
[<CommonParameters>]#Parameter set:
PolygonExamples
Crop using rectangle
New-ImageCrop -FilePath in.png -OutputPath out.png -X 10 -Y 10 -Width 100 -Height 100Crop using circle
New-ImageCrop -FilePath in.png -OutputPath out.png -CenterX 50 -CenterY 50 -Radius 25Parameters
- -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.
- -CenterX Single
- X coordinate of the circle center.
- -CenterY Single
- Y coordinate of the circle center.
- -Radius Single
- Radius of the circle.
- -Points PointF[]
- Points describing a polygon.
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.