imageutils

package
v0.0.0-...-b0c59d4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadImage

func LoadImage(path string) (image.Image, error)

LoadImage loads an image from the filesystem and attempts to decode it

func SaveImage

func SaveImage(img image.Image, format ImageFormat, path string) error

SaveImage takes an image and saves it to the target path in the desired format

Types

type ImageFormat

type ImageFormat string
const (
	ImageFormatJPG     ImageFormat = "jpg"
	ImageFormatPNG     ImageFormat = "png"
	ImageFormatInvalid ImageFormat = ""
)

func GetImageFormatFromString

func GetImageFormatFromString(input string) (ImageFormat, error)

GetImageFormatFromString is a helper to get the ImageFormat from a string

Jump to

Keyboard shortcuts

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