avatar

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package avatar provides utilities for GitHub avatars

Index

Constants

This section is empty.

Variables

View Source
var (
	// Width is a global value for the width of an avatar in pixels.
	//
	// Several utilities share this value.
	Width = 400
	// Height is a global value for the height of an avatar in pixels.
	//
	// Several utilities share this value.
	Height = 400
)

Functions

func Circlify

func Circlify(avatar image.Image) image.Image

Circlify is a utility function to convert an avatar to a circle.

func Decode

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

Decode decodes a GitHub avatar from a URL.

func Noop

func Noop(avatar image.Image) image.Image

Noop is a utility function to do nothing to an avatar. This exists to have the same signature as other formatting functions.

Types

type Formatter

type Formatter = func(image.Image) image.Image

Formatter is a function to call on avatar images to format them.

Directories

Path Synopsis
Package grid provides utilities for drawing a grid of GitHub avatars.
Package grid provides utilities for drawing a grid of GitHub avatars.

Jump to

Keyboard shortcuts

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