gitea: code.gitea.io/gitea/modules/avatar Index | Files

package avatar

import "code.gitea.io/gitea/modules/avatar"

Index

Package Files

avatar.go

Constants

const AvatarSize = 290

AvatarSize returns avatar's size

func Prepare Uses

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 Uses

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 Uses

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).

Package avatar imports 11 packages (graph) and is imported by 9 packages. Updated 2019-05-28. Refresh now. Tools for package owners.