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.
Types ¶
This section is empty.