imghash

command module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: BSD-2-Clause Imports: 11 Imported by: 0

README

command imghash is a simple wrapper around the corona10/goimagehash and buckket/go-blurhash libraries.

Go Report Card Go

Installation

You may download the latest release, or compile the binary yourself.

cd $HOME
go get github.com/wayneashleyberry/imghash

Usage

Usage:
  imghash [file] [file] [flags]

Flags:
  -h, --help               help for imghash
  -x, --x-components int   blur hash: x components (default 4)
  -y, --y-components int   blur hash: y components (default 3)

Example

Calculate the hash of a single image:

$ imghash testdata/octocat-de-los-muertos.jpg
WYzVi9sUE2Wn8N7KP5uwjg==
a:c30081c3c3c7e7ff
d:0f2b1717170f0f1f
p:bc6bc2b689a5b0a5
LoPG23nO_NozDis;kCWAwIoLR+W;

Calculate the distance between hashes of two images:

$ imghash testdata/octocat-de-los-muertos.jpg testdata/octocat-de-los-muertos.jpg
a:0
d:0
p:0
$ imghash testdata/octocat-de-los-muertos.jpg testdata/puddle_jumper_octodex.jpg
a:15
d:13
p:28

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL