# New-ImageCrop

Creates a cropped version of an image using rectangular, circular or polygonal areas.

Project

ImagePlayground

Automate image processing, codes, metadata, charts, topology, and visual stories from PowerShell.

[View on GitHub](https://github.com/EvotecIT/ImagePlayground) [Visit Website](#) [Releases](https://github.com/EvotecIT/ImagePlayground/releases) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/ImagePlayground)

Stars **102**

Forks **7**

Open issues 

Total downloads **708,853**

Release **ImagePlayground-PowerShellModule.v3.2.7**

Language: C# Updated: 2026-11-18

Command 

**Module**

`ImagePlayground`

**Inputs**

`System.String`

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>]
```

[#](#method-new-imagecrop-string-int32-switchparameter-string-int32-int32-int32)

Parameter set: `Rectangle`

```
New-ImageCrop
[-CenterX <Single>]
[-CenterY <Single>]
[-FilePath] <String>
[-Open]
[-OutputPath] <String>
[-Radius <Single>]
[<CommonParameters>]
```

[#](#method-new-imagecrop-single-single-string-switchparameter-string-single)

Parameter set: `Circle`

```
New-ImageCrop
[-FilePath] <String>
[-Open]
[-OutputPath] <String>
[-Points <PointF[]>]
[<CommonParameters>]
```

[#](#method-new-imagecrop-string-switchparameter-string-pointf)

Parameter set: `Polygon`

## Examples

### Crop using rectangle

```powershell
New-ImageCrop -FilePath in.png -OutputPath out.png -X 10 -Y 10 -Width 100 -Height 100
```

### Crop using circle

```powershell
New-ImageCrop -FilePath in.png -OutputPath out.png -CenterX 50 -CenterY 50 -Radius 25
```

## Parameters

**-FilePath String requiredposition: 0pipeline: True (ByValue)**

Path to the image being cropped.

**-Height Int32 optionalsets: Rectangle**

Height of the rectangle.

**-Open SwitchParameter optional**

Open the cropped file after creation.

**-OutputPath String requiredposition: 1**

Where to save the cropped image.

**-Width Int32 optionalsets: Rectangle**

Width of the rectangle.

**-X Int32 optionalsets: Rectangle**

X coordinate for rectangle cropping.

**-Y Int32 optionalsets: Rectangle**

Y coordinate for rectangle cropping.

**-CenterX Single optionalsets: Circle**

X coordinate of the circle center.

**-CenterY Single optionalsets: Circle**

Y coordinate of the circle center.

**-Radius Single optionalsets: Circle**

Radius of the circle.

**-Points PointF[] optionalsets: Polygon**

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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:77A78135E02A02EEE145A9DD5FA64A3424FF52EE46AC2B2F7FECFF59DEE1407B -->
