API Reference
Command
Resize-Image
Resizes an image.
Remarks
Use width/height parameters or Percentage.
Examples
Resize to 100x100
Resize-Image -FilePath in.png -OutputPath out.png -Width 100 -Height 100
Double the size
Resize-Image -FilePath in.png -OutputPath out.png -Percentage 200
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
Resize-Image [-DontRespectAspectRatio] -FilePath <String> [-Height <Int32>] -OutputPath <String> [-Width <Int32>] [<CommonParameters>]#Parameter set:
HeightWidthParameters
- DontRespectAspectRatio SwitchParameter
- Only valid when resizing by width or height.
- FilePath String
- The image must exist.
- Height Int32
- Used with Width when not using Percentage.
- OutputPath String
- Supported formats depend on the file extension.
- Width Int32
- Used with Height when not using Percentage.
Resize-Image -FilePath <String> -OutputPath <String> [-Percentage <Int32>] [<CommonParameters>]#Parameter set:
PercentageParameters
- FilePath String
- The image must exist.
- OutputPath String
- Supported formats depend on the file extension.
- Percentage Int32
- Applies uniform scaling relative to the original size.