gobarcode

package module
v0.0.0-...-3a2e176 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultImgWidth  = 350
	DefaultImgHeight = 70
)
View Source
const (
	Version = "1.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

Operation 二维码操作

func QrCode

func QrCode(ctx context.Context, imgWidth int, imgHeight int, qcContent string) (*Operation, error)

QrCode 生成条形码

func QrCodeText

func QrCodeText(ctx context.Context, imgWidth int, imgHeight int, textContent string, qcContent string) (*Operation, error)

QrCodeText 生成条形码带文本

func (*Operation) Encode

func (o *Operation) Encode() ([]byte, error)

Encode 返回图片字节

func (*Operation) EncodePNG

func (o *Operation) EncodePNG(w io.Writer) error

EncodePNG 返回图片编码

func (*Operation) SavePNG

func (o *Operation) SavePNG(filePath, fileName string) error

SavePNG 保存图片

Jump to

Keyboard shortcuts

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