goqrcode

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEncoder = Encoder{
	AlphaThreshold: 2000,
	GreyThreshold:  30,
	QRLevel:        qrc.Highest,
}

DefaultEncoder is the encoder with default settings.

Functions

func Encode

func Encode(str string, logo image.Image, size int) (*bytes.Buffer, error)

Encode encodes QR image, adds logo overlay and renders result as PNG.

Types

type Encoder

type Encoder struct {
	AlphaThreshold int
	GreyThreshold  int
	QRLevel        qrc.RecoveryLevel
}

Encoder defines settings for QR/Overlay encoder.

func (Encoder) Encode

func (e Encoder) Encode(str string, logo image.Image, size int) (*bytes.Buffer, error)

Encode encodes QR image, adds logo overlay and renders result as PNG.

Jump to

Keyboard shortcuts

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