favicon

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Favicon

type Favicon string

Favicon is 64x64 sized data uri image send in response to a server list ping. Refer to https://en.wikipedia.org/wiki/Data_URI_scheme for details. Example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAABCAYAAABubagXAAAAEElEQVR42mP8z8BQzzCCAQB+lAGA+H8KEAAAAABJRU5ErkJggg=="

func FromBytes added in v0.27.0

func FromBytes(b []byte) Favicon

FromBytes takes the bytes encoding of an image and converts it to Favicon.

func FromFile

func FromFile(filename string) (Favicon, error)

FromFile takes the filename of an image and converts it to Favicon.

func FromImage

func FromImage(img image.Image) (Favicon, error)

FromImage converts an image.Image to Favicon.

func (Favicon) Bytes added in v0.27.0

func (f Favicon) Bytes() []byte

Bytes returns the bytes encoding of the favicon.

Jump to

Keyboard shortcuts

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