Command
Compare-Image
Compares two images and optionally saves a difference mask.
Syntax
Compare-Image
[-FilePath] <String>
[-FilePathToCompare] <String>
[[-OutputPath] <String>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
When OutputPath is omitted, the cmdlet writes the comparison result to the pipeline instead of creating a file.
Examples
Compare two images
Compare-Image -FilePath img1.png -FilePathToCompare img2.pngParameters
- -FilePath String
- First image path.
- -FilePathToCompare String
- Second image path.
- -OutputPath String
- When provided, the cmdlet writes a visual difference image instead of only returning the comparison result.
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.