You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// `image` now containes the width and the height of an RGBA image
73
+
// `image` now contains the width and the height of an RGBA image
74
74
// visualizing the difference between `image1` and `image2`.
75
-
// `pixels` is the amount of pixels which didn't match.
76
-
// `totalDelta` is a relatively scaled number with higher values being
77
-
// the most different and `0` being total equal.
75
+
// `pixels` is the number of pixels which didn't match.
76
+
// `totalDelta` is a number denoting the relative difference
77
+
// between the images with higher values being
78
+
// the more different and `0` being entirely equal.
78
79
```
79
80
80
-
The two buffers in `image1` and `image2` are expected to contain an RGB or RGBA encoded 8bit image. In the above example an RGB image was used.
81
+
The two buffers in `image1` and `image2` are expected to contain an RGB or RGBA encoded 8-bit image. In the above example an RGB image was used.
81
82
82
83
Both images will be compared pixel-per-pixel and the result as well as a visualization of the difference is returned.
83
84
@@ -124,23 +125,23 @@ A result might look like this:
124
125
125
126
#### pixels
126
127
127
-
This represents the total amount of pixels differing between both images.
128
+
This represents the total number of pixels differing between both images.
128
129
129
130
#### totalDelta
130
131
131
132
This is the summed up total perceived difference of all pixels. It grows with the color difference of every unmatched pixel.
132
133
133
134
In comparison to the [pixels](https://prior99.github.io/native-image-diff/docs/interfaces/diffresult.html#pixels) property this property also represents how different all colors were. Comparing a white image
134
-
with a black image would yield a higher difference as comparing an orange with a red image.
135
+
with a black image would yield a higher difference than comparing an orange with a red image.
135
136
136
137
It doesn't feature any specific unit and should be used for relative comparisons only.
137
138
138
139
#### image
139
140
140
-
This property is only generate if [generateDiffImage](https://prior99.github.io/native-image-diff/docs/interfaces/diffimagesarguments.html#generatediffimage) is set to `true` (default).
141
+
This property is only generated if [generateDiffImage](https://prior99.github.io/native-image-diff/docs/interfaces/diffimagesarguments.html#generatediffimage) is set to `true` (default).
141
142
142
-
It's properties `width` and `height` represent the dimensions of the generated image in pixels and `data` holds a RGBA buffer
143
-
of raw image data showing the visual difference between both input images. Different pixels are drawn in red and pixels which
143
+
Its properties `width` and `height` represent the dimensions of the generated image in pixels and `data` holds a RGBA buffer
144
+
of raw image data showing the visual difference between both input images. Different pixels are drawn in red, and pixels which
144
145
only differed between both images because of antialiasing will be drawn in yellow. This is only true if [detectAntialiasing](https://prior99.github.io/native-image-diff/docs/interfaces/diffimagesarguments.html#detectantialiasing)
145
146
is set to `true` (default).
146
147
@@ -222,11 +223,11 @@ The operations per second are displayed (Higher is better).
222
223
223
224

224
225
225
-
*(The x-axis scale shows the amount of diffed images per second.)*
226
+
*(The x-axis scale shows the number of diffed images per second.)*
226
227
227
228
## Contributing
228
229
229
-
Yarn is used instead of npm, so make sure it is installed, probably:`npm install -g yarn`.
230
+
Yarn is used instead of npm, so make sure it is installed.`npm install -g yarn`.
0 commit comments