cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPreview added in v0.0.8

func GetPreview(src string, hash string) (string, error)

GetPreview returns the preview image

func Hash added in v0.0.8

func Hash(path string) (string, error)

Hash returns xxh3_128 sum

func IsCached

func IsCached(hash string, isVideo bool) bool

IsCached checks if the file is colors is cached or not

func LoadCache

func LoadCache(hash string) (material.Quantized, error)

LoadCache tries to load cached colors for this image

func SaveCache

func SaveCache(hash string, output material.Quantized) error

SaveCache saves output colors to cache dir

func SaveState

func SaveState(source, hash string, output material.Quantized) error

SaveState saves state to state dir

Types

type State

type State struct {
	Path      string             `json:"filename"`
	Hash      string             `json:"hash"`
	Quantized material.Quantized `json:"quantized"`
}

State is the current generation state

func LoadState

func LoadState() (State, error)

LoadState saves state to state dir

Jump to

Keyboard shortcuts

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