ff

package
v0.0.0-...-8577a5a Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstFrame

func FirstFrame(path string, maxw, maxh int, s ScalerAlgorithm) (image.Image, error)

FirstFrame gets the roughly-resized first frame.

func FirstFrameJPEG

func FirstFrameJPEG(path string, maxw, maxh int, s ScalerAlgorithm) ([]byte, error)

FirstFrameJPEG gets the roughly-resized first frame in raw JPEG bytes.

Types

type ScalerAlgorithm

type ScalerAlgorithm string
const (
	// LanczosScaler is a decently fast, sharp and smooth rescaler algorithm.
	LanczosScaler ScalerAlgorithm = "lanczos"
	// NeighborScaler is a rough but very fast rescaler algorithm.
	NeighborScaler ScalerAlgorithm = "neighbor"
)

type Size

type Size struct {
	Width  int
	Height int
}

func ProbeSize

func ProbeSize(path string) (*Size, error)

Jump to

Keyboard shortcuts

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