Documentation ¶
Index ¶
- type QRCodeTool
- func (s *QRCodeTool) GenerateColorQrcodeToFile(content, filename string, background, foreground color.Color, size int) error
- func (s *QRCodeTool) GenerateQrcodeToBase64(content string, size int) (*string, error)
- func (s *QRCodeTool) GenerateQrcodeToBytes(content string, size int) (*[]byte, error)
- func (s *QRCodeTool) GenerateQrcodeToFile(content, filename string, size int) error
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().