mirror of
https://github.com/simon987/fastimagehash-go.git
synced 2025-12-20 09:05:57 +00:00
Initial commit
This commit is contained in:
25
README.md
Normal file
25
README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
## fastimagehash-go
|
||||
|
||||
[fastimagehash](https://github.com/simon987/fastimagehash) *cgo* bindings.
|
||||
|
||||
The latest `libfastimagehash` version must be installed as system library
|
||||
for `fastimagehash-go` to compile.
|
||||
|
||||
|
||||
### Example usage
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/simon987/fastimagehash"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
hash, ret := fastimagehash.PHashFile("/path/to/image.jpg", 8, 4)
|
||||
|
||||
if ret == fastimagehash.Ok {
|
||||
fmt.Printf("%s (%d)\n", hash.ToHexStringReversed(), ret)
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user