cache

package
v5.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPreview

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

GetPreview returns the preview image.

func Hash

func Hash(path string) (string, error)

Hash returns md5 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