loader

package
v0.0.0-...-17244d7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Load thumbnail handlers

Index

Constants

View Source
const (
	SizeFlagLarge  int = 256
	SizeFlagNormal     = 128
	SizeFlagSmall      = 64
)

Variables

This section is empty.

Functions

func CompositeIcons

func CompositeIcons(icons []string, bg, dest string,
	iconSize, width, height, padding int) error

func GetBackground

func GetBackground(width, height int) (string, error)

func GetThumbnailDest

func GetThumbnailDest(uri string, width, height int) (string, error)

func GetTmpImage

func GetTmpImage() string

func IsStrInList

func IsStrInList(item string, items []string) bool

func Register

func Register(ty string, handler HandleType)

func ScaleImage

func ScaleImage(src, dest string, width, height int) error

func ThumbnailImage

func ThumbnailImage(src, dest string, width, height int) error

Types

type HandleType

type HandleType func(string, string, int, int, bool) (string, error)

args: src, bg, width, height, force rets: dest, error

func GetHandler

func GetHandler(ty string) (HandleType, error)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func (*Manager) Add

func (m *Manager) Add(ty string, handler HandleType) error

func (*Manager) Delete

func (m *Manager) Delete(ty string)

func (*Manager) Get

func (m *Manager) Get(ty string) HandleType

Jump to

Keyboard shortcuts

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