Skip to content

Commit c066bdb

Browse files
committed
add a readme
1 parent 9058a73 commit c066bdb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Py-Image-Diff
2+
3+
A simple python image difference library. It returns the % difference of the
4+
image. Additionally, it also saves the visual differences to a file called
5+
`diff.png`.
6+
7+
Here is a sample image of the visual difference:
8+
9+
![](./diff.png)
10+
11+
### Usage
12+
13+
To use the library you need to build the `.so`. Here is the go building command:
14+
`go build -o lib.so -buildmode=c-shared library.go`
15+
16+
Usage of the library is really simple. The only exported function is `compare`.
17+
18+
```python
19+
import imagediff
20+
21+
with open("a.png", 'rb') as a:
22+
with open("b.png", 'rb') as b:
23+
difference = library.compare(a.read(), b.read())
24+
print(difference)
25+
```

0 commit comments

Comments
 (0)