Documentation ¶
Overview ¶
Package qart generates a pretty qr img *
- Copyright ©2014-04-07 Alex <zhirun.yu@duitang.com>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
func Encode(url string, src []byte, seed int64, version, scale, mask, x, y int, randCtrl, dither, onlyData, saveCtrl bool) []byte
Encode encodes a string with an image as the background
func EncodeByFile ¶
EncodeByFile encodes the given url with a specific image
Types ¶
type Image ¶
type Image struct { Target [][]int Dx int Dy int URL string Tag string Version int Mask int Scale int Rotation int Size int // RandControl says to pick the pixels randomly. RandControl bool Seed int64 // Dither says to dither instead of using threshold pixel layout. Dither bool // OnlyDataBits says to use only data bits, not check bits. OnlyDataBits bool // Code is the final QR code. Code *qr.Code // Control is a PNG showing the pixels that we controlled. // Pixels we don't control are grayed out. SaveControl bool Control []byte }
Image generates the pretty qr code
Click to show internal directories.
Click to hide internal directories.