-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compare-images): define CompareImagesMetric
- Loading branch information
Showing
7 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/compare-images/typescript/src/compare-double-images-node-result.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/compare-images/typescript/src/compare-images-metric.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
interface CompareImagesMetric { | ||
/** Whether the test image and one of the baseline images are equal given specified tolerances. */ | ||
almostEqual: boolean; | ||
|
||
/** The number of pixels that are different. */ | ||
numberOfPixelsDifferent: number; | ||
|
||
/** Minimum pixel intensity difference. */ | ||
minimumDifference: number; | ||
|
||
/** Maximum pixel intensity difference. */ | ||
maximumDifference: number; | ||
|
||
/** Mean pixel intensity difference. */ | ||
meanDifference: number; | ||
|
||
/** Total pixel intensity difference. */ | ||
totalDifference: number; | ||
} | ||
|
||
export default CompareImagesMetric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters