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
Copy file name to clipboardExpand all lines: README.md
+15-24
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ ODiff is a blazing fast native image comparison tool. Check [benchmarks](#benchm
30
30
- ✅ Supports comparison of images with different layouts
31
31
- ✅ Using [YIQ NTSC
32
32
transmission algorithm](http://www.progmat.uaem.mx:8080/artVol2Num2/Articulo3Vol2Num2.pdf) to determine visual difference
33
-
- ✅ Requires only [libpng](http://www.libpng.org/pub/png/libpng.html) which is a part of most unix system by default
33
+
- ✅ No dependencies for `.png` comparison.
34
34
35
35
### Coming in the nearest future:
36
36
@@ -81,7 +81,7 @@ NodeJS Api is pretty tiny as well. Here is a typescript interface we have:
81
81
```ts
82
82
typeODiffOptions= {
83
83
/** Output full diff image. */
84
-
diffImage:boolean;
84
+
outputDiffMask:boolean;
85
85
/** Do not compare images and produce output if images layout is different. */
86
86
failOnLayoutDiff:boolean;
87
87
/** Color difference threshold (from 0 to 1). Less more precise. */
@@ -104,7 +104,7 @@ Compare option will return `{ match: true }` if images are identical. Otherwise
104
104
105
105
## Installation
106
106
107
-
> ⛔️ **for windows users** ⛔️ It is required to install http://www.libpng.org/pub/png/libpng.html manually. But there is a great chance that it was already installed by some other program.
107
+
We provide prebuilt binaries for most of the used platforms, there are a few ways to install them:
108
108
109
109
### Cross-platform
110
110
@@ -124,22 +124,13 @@ odiff --help
124
124
125
125
### lib* dependencies
126
126
127
-
Make sure that this library depends on the system `lib{png,jpg,gif}` libraries to encode/decode images. They are optional, so if you are running comparison of only `.png` files – only `libpng` is required.
128
-
129
-
Make sure that appropriate dependencies are installed on your system. Especially when you are running odiff on CI or in Docker.
130
-
131
-
#### Ubuntu
132
-
133
-
For Ubuntu 18.04+ [there is no lib* deps preinstalled](https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html) so it will be required to run the docker.
134
-
135
-
```
136
-
apt-get install -y libpng12-0
137
-
```
138
-
127
+
Make sure if you want to compare **other** than `.png` images it is required to install the proper C library for each format. For `.jpg` – [libjpg](http://libjpeg.sourceforge.net/), for `.tiff` –[libtiff](http://www.libtiff.org/), for `.xpm` - libxpm.
139
128
129
+
`.png` images works out of the box.
130
+
140
131
### MacOS
141
132
142
-
> ⛔️ Doesn't work. Waiting for brew approve ⛔️
133
+
> ⛔️ Doesn't work. Waiting for brew approve ⛔️
143
134
144
135
```
145
136
brew install odiff
@@ -167,23 +158,23 @@ Performance matters. At least for sort of tasks like visual regression. For exam
167
158
3s * 25000 / 3600 = 20,83333 hours
168
159
```
169
160
170
-
Here is `odiff` performance comparison with other popular visual difference solutions. We are going to compare some real-world use cases.
161
+
Here is `odiff` performance comparison with other popular visual difference solutions. We are going to compare some real-world use cases.
171
162
172
163
Lets compare 2 screenshots of full-size [https://cypress.io](cypress.io) page:
173
164
174
165
| Command | Mean [s]| Min [s]| Max [s]| Relative |
Wow. Odiff is mostly 2 times faster than imagemagick and pixelmatch. And this will be even clearer if image will become larger. Lets compare a [4k image](images/water-4k.png) to find a difference with [another 4k image](images/water-4k-2.png):
171
+
Wow. Odiff is mostly 2 times faster than imagemagick and pixelmatch. And this will be even clearer if image will become larger. Lets compare an [8k image](images/water-4k.png) to find a difference with [another 8k image](images/water-4k-2.png):
181
172
182
173
| Command | Mean [s]| Min [s]| Max [s]| Relative |
0 commit comments