qrcode

package
v0.0.0-...-4caec29 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EXT_JPEG = ".jpeg"

Variables

This section is empty.

Functions

func GetQRCodeFullPath

func GetQRCodeFullPath() string

func GetQRCodeFullURL

func GetQRCodeFullURL(name string) string

func GetQRCodeMD5Name

func GetQRCodeMD5Name(value string) string

func GetQRCodePath

func GetQRCodePath() string

Types

type QRCode

type QRCode struct {
	URL    string
	Width  int
	Height int
	Ext    string
	Level  qr.ErrorCorrectionLevel
	Mode   qr.Encoding
}

func NewQRCode

func NewQRCode(url string, width, height int, level qr.ErrorCorrectionLevel, mode qr.Encoding) *QRCode

func (*QRCode) CheckEncode

func (q *QRCode) CheckEncode(path string) bool

func (*QRCode) Encode

func (q *QRCode) Encode(path string) (string, string, error)

Encode 1、创建二维码生成路径 2、生成二维码 3、缩放二维码到指定大小 4、新建存放二维码图片的文件 5、将二维码图像以JPEG 4:2:0 的基线格式写入文件

func (*QRCode) GetQRCodeExt

func (q *QRCode) GetQRCodeExt() string

Jump to

Keyboard shortcuts

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