File tree 1 file changed +17
-3
lines changed
1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 6
6
declare namespace Resemble {
7
7
interface ResembleStatic {
8
8
/**
9
- * Retrieve basic analysis on one image (add compareTo to compare with another).
9
+ * Retrieve basic analysis for a single image (add compareTo to compare with another).
10
10
*/
11
11
( image : string | ImageData ) : ResembleAnalysis ;
12
12
@@ -29,13 +29,13 @@ declare namespace Resemble {
29
29
30
30
interface ResembleAnalysis {
31
31
/**
32
- * Run the analysis and get the result
32
+ * Run the analysis on this image and get the result
33
33
*/
34
34
onComplete ( callback : ( result : ResembleAnalysisResult ) => void ) : void ;
35
35
36
36
/**
37
37
* Compare this image to another image, to get resemblance data
38
- */
38
+ */
39
39
compareTo ( fileData : string | ImageData ) : ResembleComparison ;
40
40
}
41
41
@@ -60,15 +60,29 @@ declare namespace Resemble {
60
60
}
61
61
62
62
interface ResembleComparisonResult {
63
+ /**
64
+ * Do the two images have the same dimensions?
65
+ */
63
66
isSameDimensions : boolean ;
67
+
68
+ /**
69
+ * The difference in width and height between the dimensions of the two compared images
70
+ */
64
71
dimensionDifference : {
65
72
width : number ;
66
73
height : number ;
67
74
} ;
68
75
76
+ /**
77
+ * Get a data URL for the comparison image
78
+ */
69
79
getImageDataUrl ( ) : string ;
70
80
81
+ /**
82
+ * The percentage of pixels which do not match between the images
83
+ */
71
84
misMatchPercentage : number ;
85
+
72
86
diffBounds : {
73
87
top : number ;
74
88
left : number ;
You can’t perform that action at this time.
0 commit comments