avatar

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: MIT Imports: 11 Imported by: 67

Documentation

Index

Constants

View Source
const AvatarSize = 290

AvatarSize returns avatar's size

Variables

This section is empty.

Functions

func Prepare added in v1.9.0

func Prepare(data []byte) (*image.Image, error)

Prepare accepts a byte slice as input, validates it contains an image of an acceptable format, and crops and resizes it appropriately.

func RandomImage

func RandomImage(data []byte) (image.Image, error)

RandomImage generates and returns a random avatar image unique to input data in default size (height and width).

func RandomImageSize

func RandomImageSize(size int, data []byte) (image.Image, error)

RandomImageSize generates and returns a random avatar image unique to input data in custom size (height and width).

Types

This section is empty.

Jump to

Keyboard shortcuts

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