MCPcopy Create free account
hub / github.com/gogs/gogs / RandomImage

Function RandomImage

internal/avatar/avatar.go:37–39  ·  view source on GitHub ↗

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

(data []byte)

Source from the content-addressed store, hash-verified

35// RandomImage generates and returns a random avatar image unique to input data
36// in DefaultSize (height and width).
37func RandomImage(data []byte) (image.Image, error) {
38 return RandomImageWithSize(DefaultSize, data)
39}

Callers 2

GenerateRandomAvatarFunction · 0.92
Test_RandomImageFunction · 0.85

Calls 1

RandomImageWithSizeFunction · 0.85

Tested by 1

Test_RandomImageFunction · 0.68