phash

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compute

func Compute(r io.ReadSeeker) (string, error)

Compute reads an image from r, decodes it, and returns a 16-char hex pHash string. Returns empty string and nil error for unsupported/undecodable/oversized image formats. Returns empty string and error only for hashing failures on successfully decoded images.

r must be seekable: the image header is inspected first (via DecodeConfig) to reject oversized images before the full decode allocates pixel memory, then r is rewound for the full decode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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