resizer

package
v0.0.0-...-3a47d3a Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidModifier = errors.New("invalid modifier")

Functions

func ModifiedPath

func ModifiedPath(path string, modifiers Modifiers) string

func Resize

func Resize(reader io.Reader, writer io.Writer, width, height int) error

Resize resizes an image to the specified width and height

func ResizeFile

func ResizeFile(inputPath, outputPath string, width, height int) error

func StringifyModifiers

func StringifyModifiers(modifiers Modifiers) string

Types

type Modifiers

type Modifiers struct {
	Width            int
	Height           int
	Multiplier       int
	CalculatedWidth  int // This is the Width * Multiplier
	CalculatedHeight int // This is the Height * Multiplier
}

func ParseModifiers

func ParseModifiers(modifier string) (Modifiers, error)

Jump to

Keyboard shortcuts

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