type Code struct {
Bitmap []byte// 1 is black, 0 is white Size int// number of pixels on a side Stride int// number of bytes per row Scale int// number of image pixels per QR pixel}
A Code is a square pixel grid.
It implements image.Image and direct PNG encoding.
PNG uses a custom encoder tailored to QR codes.
Its compressed size is about 2x away from optimal,
but it runs about 20x faster than calling png.Encode
on c.Image().