thumbnailer

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Thumbnail

func Thumbnail(dims Dims, inputFile string) (thumb image.Image, err error)

func ThumbnailPercentage added in v0.8.19

func ThumbnailPercentage(percentage float64, inputFile string) (thumb image.Image, err error)

Types

type Dims

type Dims struct {
	Width  uint `yaml:"width"`
	Height uint `yaml:"height"`
}

Dims denote the maximum width and height of the thumbnail The algorithm will try to resize the image to the maximum possible size that preserves the aspect ratio and fits within the given dimensions.

Jump to

Keyboard shortcuts

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