source

package
v0.0.0-...-c082557 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CropImageToAspectRatio

func CropImageToAspectRatio(img image.Image, targetAspectRatio image.Point) image.Image

Types

type ImageSource

type ImageSource interface {
	GetImageNames() ([]string, error)
	GetImage(name string) (image.Image, error)
	Close()
}

ImageSource is an interface for describing a source of images

func NewCropSource

func NewCropSource(src ImageSource, targetAspectRatio image.Point) ImageSource

func NewFolderImageSource

func NewFolderImageSource(dir string) (ImageSource, error)

NewFolderImageSource creates a folder-backed ImageSource

func NewImageSource

func NewImageSource(target string) (ImageSource, error)

NewImageSource detects the type of the target and creates the appropriate ImageSource

func NewZipImageSource

func NewZipImageSource(zipFile string) (ImageSource, error)

NewZipImageSource creates an ImageSource from the given zip file

Jump to

Keyboard shortcuts

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