image

package
v0.0.0-...-0fb68f2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidInput = errors.New("invalid input reader")

Functions

This section is empty.

Types

type Degree

type Degree int
const (
	None Degree = iota
	Degree90
	Degree180
)

type Detector

type Detector interface {
	Detect(img io.Reader) (Images, error)
}

func NewFakeDetector

func NewFakeDetector() Detector

type Hash

type Hash struct {
	Value []uint64
	Bits  int
}

func (Hash) AsBase2

func (h Hash) AsBase2() []string

type Hasher

type Hasher interface {
	// Hash builds a hash based on the given image
	Hash(img Image) (Hash, error)
	// Distance builds the distance between the given hashes
	Distance(hash1 Hash, hash2 Hash) (int, error)
}

func NewPHasher

func NewPHasher() Hasher

type Image

type Image struct {
	image.Image
}

func NewImage

func NewImage(in io.Reader) (Image, error)

func (Image) Rotate

func (img Image) Rotate(angle Degree) Image

type Images

type Images []Image

func NewImages

func NewImages() Images

Jump to

Keyboard shortcuts

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