qrcode

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QRCodeTool

type QRCodeTool struct{}

func (*QRCodeTool) GenerateColorQrcodeToFile

func (s *QRCodeTool) GenerateColorQrcodeToFile(content, filename string, background,
	foreground color.Color, size int) error

GenerateColorQrcodeToFile

WriteColorFile encodes, then writes a QR Code to the given filename in PNG format. With WriteColorFile you can also specify the colors you want to use. size is both the image width and height in pixels. If size is too small then a larger image is silently written. Negative values for size cause a variable sized image to be written: See the documentation for Image().

func (*QRCodeTool) GenerateQrcodeToBase64

func (s *QRCodeTool) GenerateQrcodeToBase64(content string, size int) (*string, error)

GenerateQrcodeToBase64

Generate a QR code and convert it to Base 64

func (*QRCodeTool) GenerateQrcodeToBytes

func (s *QRCodeTool) GenerateQrcodeToBytes(content string, size int) (*[]byte, error)

GenerateQrcodeToBytes

Encode a QR Code and return a raw PNG image. size is both the image width and height in pixels. If size is too small then a larger image is silently returned. Negative values for size cause a variable sized image to be returned: See the documentation for Image(). To serve over HTTP, remember to send a Content-Type: image/png header.

func (*QRCodeTool) GenerateQrcodeToFile

func (s *QRCodeTool) GenerateQrcodeToFile(content, filename string, size int) error

GenerateQrcodeToFile

WriteFile encodes, then writes a QR Code to the given filename in PNG format. size is both the image width and height in pixels. If size is too small then a larger image is silently written. Negative values for size cause a variable sized image to be written: See the documentation for Image().

Jump to

Keyboard shortcuts

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