mirror of
https://github.com/simon987/fastimagehash-go.git
synced 2025-04-18 18:06:43 +00:00
update example
This commit is contained in:
parent
222fecc338
commit
0b8019bc1e
@ -11,7 +11,7 @@ for `fastimagehash-go` to compile.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/simon987/fastimagehash"
|
"github.com/simon987/fastimagehash-go"
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fastimagehash"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/simon987/fastimagehash-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
hash, ret := fastimagehash.PHashFile("/path/to/image.jpg", 8, 4)
|
hash, ret := fastimagehash.PHashFile("/path/to/image.jpg", 8, 4)
|
||||||
|
|
||||||
if ret == fastimagehash.Ok {
|
if ret == fastimagehash.Ok {
|
||||||
fmt.Printf("%s (%d)\n", hash.ToHexStringReversed(), ret)
|
fmt.Printf("%s (%d)\n", hash.ToHexStringReversed(), ret)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user