You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Canvas returns the QR Code as an image.Image.
func (q *QRCode) Canvas() *canvas.Canvas {
// Based on Image...
}
and this can be saved to appropriate format using,
c := q.Canvas()
c.WriteFile("out.svg", svg.Writer)
c.WriteFile("out.pdf", pdf.Writer)
c.WriteFile("out.eps", eps.Writer)
c.WriteFile("out.png", rasterizer.PNGWriter(3.2))
Attached a draft modification.
Best,
E.
The text was updated successfully, but these errors were encountered:
Hi ! Thanks for this library. It would be nice to be able to save the QRCode to SVG, PDF or EPS as well as PNG.
For example, adding dependency to
https://github.com/tdewolff/canvas/
the qrcode.go could have
// Canvas returns the QR Code as an image.Image.
func (q *QRCode) Canvas() *canvas.Canvas {
// Based on Image...
}
and this can be saved to appropriate format using,
c := q.Canvas()
c.WriteFile("out.svg", svg.Writer)
c.WriteFile("out.pdf", pdf.Writer)
c.WriteFile("out.eps", eps.Writer)
c.WriteFile("out.png", rasterizer.PNGWriter(3.2))
Attached a draft modification.
Best,
E.
The text was updated successfully, but these errors were encountered: