analyzer

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: BSD-3-Clause Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InspectImage added in v0.10.0

func InspectImage(system fs.FS, link manifest.Link, algorithms []manifest.HashAlgorithm) (*manifest.Link, error)

InspectImage inspects an image located in the provided filesystem, using the provided link's manifest.HREF as a path. Additional properties from the link, such as the mediatype.MediaType, may be used, and should be included. A copy of the provided link will be returned, with the `size`, `width`, `height` and `properties.animated` attributes set. A slice of manifest.HashAlgorithm can be provided, in which case the returned link will also have `properties.hash` set with the computed hashes. Currently, the supported algorithms are: manifest.HashAlgorithmSHA256, manifest.HashAlgorithmMD5, manifest.HashAlgorithmPhashDCT, and `https://blurha.sh` (BlurHash). The latter two are visual hashes, which are more computationally expensive.

func MatchImage added in v0.10.0

func MatchImage(link manifest.Link, hashes manifest.HashList) (bool, error)

MatchImage compares the link with the given hashes to determine if they match.

Types

This section is empty.

Jump to

Keyboard shortcuts

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