img

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(filepath string) (image.Image, error)

Decode reads an image from a file and returns the image.Image. If the file cannot be read, an error is returned.

func Resize

func Resize(image image.Image, width, height int) image.Image

Resizes an image to the specified width and height. If either width or height is 0, the aspect ratio is maintained. If the output of the resize has an uneven height, a final resize is done to make it even. This prevents a line of black pixels from appearing at the bottom of the image when rendered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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