mirror of
https://github.com/simon987/fastimagehash-go.git
synced 2025-04-10 06:06:44 +00:00
17 lines
289 B
Go
17 lines
289 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/simon987/fastimagehash-go"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println(fastimagehash.LibVersion);
|
|
|
|
hash, ret := fastimagehash.PHashFile("/path/to/image.jpg", 8, 4)
|
|
|
|
if ret == fastimagehash.Ok {
|
|
fmt.Printf("%s (%d)\n", hash.ToHexStringReversed(), ret)
|
|
}
|
|
}
|