image-diff
![Go Report Card](https://goreportcard.com/badge/github.com/olegfedoseev/image-diff)
Allow you to calculate the difference between two images. Primarily for documents for now.
You give it first image, like that:
![test-only-text test-only-text](https://github.com/fruworg/image-diff/raw/7138503d19ff/testdata/test-only-text.png)
And second one:
![test-text-number test-text-number](https://github.com/fruworg/image-diff/raw/7138503d19ff/testdata/test-text-number.png)
And you get diff percent (6.25%) and visual diff:
![diff diff](https://github.com/fruworg/image-diff/raw/7138503d19ff/testdata/diff.png)
How to get and use
go get -u github.com/olegfedoseev/image-diff
And in you code:
import "github.com/olegfedoseev/image-diff"
diff, percent, err := diff.CompareFiles("test-only-text.png", "test-text-number.png")
if percent > 0.0 {
fmt.Printf("images is different!")
}