go-tinyqr

An experimental minimal QR Code generator  http://go-qrcode.appspot.com
git clone https://git.ce9e.org/go-tinyqr.git

commit
9434209cb0863a5f3c316b49a8abb7f7dc80610a
parent
016ced4a77f51518615c9ee1d47a51a9a277591e
Author
tfh <tfh@skip.org>
Date
2019-10-27 15:24
Update README.md

Diffstat

M README.md 30 ++++++++++++++++++------------

1 files changed, 18 insertions, 12 deletions


diff --git a/README.md b/README.md

@@ -18,26 +18,20 @@ A command-line tool `qrcode` will be built into `$GOPATH/bin/`.
   18    18 
   19    19     import qrcode "github.com/skip2/go-qrcode"
   20    20 
   21    -1 - **Create a PNG image:**
   -1    21 - **Create a 256x256 PNG image:**
   22    22 
   23    23         var png []byte
   24    24         png, err := qrcode.Encode("https://example.org", qrcode.Medium, 256)
   25    25 
   26    -1 - **Create a PNG image and write to a file:**
   -1    26 - **Create a 256x256 PNG image and write to a file:**
   27    27 
   28    28         err := qrcode.WriteFile("https://example.org", qrcode.Medium, 256, "qr.png")
   29    29 
   30    -1 - **Create a PNG image with custom colors and write to file:**
   -1    30 - **Create a 256x256 PNG image with custom colors and write to file:**
   31    31 
   32    32         err := qrcode.WriteColorFile("https://example.org", qrcode.Medium, 256, color.Black, color.White, "qr.png")
   33    33 
   34    -1 All examples use the qrcode.Medium error Recovery Level and create a fixed
   35    -1 256x256px size QR Code. The last function creates a white on black instead of black
   36    -1 on white QR Code.
   37    -1 
   38    -1 The maximum capacity of a QR Code varies according to the content encoded and
   39    -1 the error recovery level. The maximum capacity is 2,953 bytes, 4,296
   40    -1 alphanumeric characters, 7,089 numeric digits, or a combination of these.
   -1    34 All examples use the qrcode.Medium error Recovery Level and create a fixed 256x256px size QR Code. The last function creates a white on black instead of black on white QR Code.
   41    35 
   42    36 ## Documentation
   43    37 
@@ -56,10 +50,13 @@ qrcode -- QR Code encoder in Go
   56    50 https://github.com/skip2/go-qrcode
   57    51 
   58    52 Flags:
   -1    53   -d	disable QR Code border
   -1    54   -i	invert black and white
   59    55   -o string
   60    -1         out PNG file prefix, empty for stdout
   -1    56     	out PNG file prefix, empty for stdout
   61    57   -s int
   62    -1         image size (pixel) (default 256)
   -1    58     	image size (pixel) (default 256)
   -1    59   -t	print as text-art on stdout
   63    60 
   64    61 Usage:
   65    62   1. Arguments except for flags are joined by " " and used to generate QR code.
@@ -71,7 +68,16 @@ Usage:
   71    68   2. Save to file if "display" not available:
   72    69 
   73    70        qrcode "homepage: https://github.com/skip2/go-qrcode" > out.png
   -1    71 
   74    72 ```
   -1    73 ## Maximum capacity
   -1    74 The maximum capacity of a QR Code varies according to the content encoded and the error recovery level. The maximum capacity is 2,953 bytes, 4,296 alphanumeric characters, 7,089 numeric digits, or a combination of these.
   -1    75 
   -1    76 ## Borderless QR Codes
   -1    77 
   -1    78 To aid QR Code reading software, QR codes have a built in whitespace border.
   -1    79 
   -1    80 If you know what you're doing, and don't want a border, see https://gist.github.com/skip2/7e3d8a82f5317df9be437f8ec8ec0b7d for how to do it. It's still recommended you include a border manually.
   75    81 
   76    82 ## Links
   77    83