go-zxing-qrencoder

module
v0.0.0-...-1597e89 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2014 License: GPL-3.0

README

go-zxing-qrencoder

ZXing QRCode Encoder Implementation in Go

This project aims to replicate and be fully compitable with ZXing QRCode Encoder version 3.1 in Golang. We want to make sure the generated QRCode is exactly the same with the Java version's.

Lots of the source code was forked from qrencode-go

Example

package main

import (
	"github.com/hSATAC/go-zxing-qrencoder/qrencode"
	"image/png"
	"os"
)

func main() {
	str := "I <3 Github."

	grid, err := qrencode.Encode(str, qrencode.ECLevelQ)
	if err != nil {
		return
	}
	f, err := os.Create("example.png")
	if err != nil {
		return
	}
	defer f.Close()
	png.Encode(f, grid.Image(5))
}

TODO

  • Encoding is hard-coded to ISO-8895-1 now, need to finish the ECI header part.

Directories

Path Synopsis
qrencode provides functions to generate QR codes.
qrencode provides functions to generate QR codes.

Jump to

Keyboard shortcuts

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