Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Jul 23, 2022
1 parent 69e57db commit 6794f8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ phash
=====

A simple perceptual hashing library in Go.
Only works for images.

Usage :

Expand All @@ -18,5 +17,10 @@ img, _, err := image.Decode(f)
if err != nil {
panic(err)
}
phash.DTC(img)
hash1 := phash.DTC(img)
hash2 := phash.DTC(img)

if phash.Distance(hash1, hash2) == 0 {
fmt.Println("these images sure do look alike.")
}
```

0 comments on commit 6794f8f

Please sign in to comment.