Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 768 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 768 Bytes

Compressed Writer

go.dev reference

Compressed Writer is a writer that is used to draw QR Code image on a very small scale. Since the compressed writer would only use a two-tone palette to generate the image, and automatically compressed in PNG format.

Check codes for more details about compress principle.

Usage

option := compressed.Option{
	Padding:   4, // padding pixels around the qr code.
	BlockSize: 1, // block pixels which represents a bit data.
}

w, err := compressed.New(name, &option)
	if err != nil {
	panic(err)
}

if err := qrc.Save(w); err != nil {
	panic(err)
}