imgtools

package
v0.0.0-...-bce2eae Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 9 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)

Loads an image from the drive and returns it as image.Image

func MfToImage

func MfToImage(file multipart.File) (image.Image, error)

func ResizeImage1x1

func ResizeImage1x1(img image.Image, width, height int) image.Image

Takes in a image.Image and tries to down scale it to the given size while keeping the aspect ratio. (1x1 Kernel)

func ResizeImage2x2

func ResizeImage2x2(img image.Image, width, height int) image.Image

Takes in a image.Image and tries to down scale it to the given size while keeping the aspect ratio. (2x2 Kernel)

func ResizeImage3x3

func ResizeImage3x3(img image.Image, width, height int) image.Image

Takes in a image.Image and tries to down scale it to the given size while keeping the aspect ratio. (3x3 Kernel)

func SaveImage

func SaveImage(img image.Image, savePath string) error

Takes in an image.Image and saves it to the given path

Types

This section is empty.

Jump to

Keyboard shortcuts

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