JuliaImages / QRCoders.jl

Creating QR Codes within Julia
https://juliaimages.org/QRCoders.jl/
MIT License
67 stars 11 forks source link

Support for more formats, for example, SVG #47

Open RexWzh opened 1 year ago

RexWzh commented 1 year ago

An idea from discourse: Handle svg files by Luxor.jl.

using Luxor
filepath = "qrcode.svg"
qrc = qrcode("https:/www.julialang.org")
@svg begin
    tiles = Tiler(250, 250, size(qrc)..., margin=0)
    squares = first.(tiles)
    for x in eachindex(qrc)
        if qrc[x]
            box(squares[x], tiles.tilewidth, tiles.tileheight, :fill)
        end
    end
end 250 250 filepath
readsvg(filepath)

In practice, Thematic-QR-codes are generated as svg files, like Pac-Man QR codes. So it is important to add support of svg format. pacman

If anyone is familiar with this area, I am very much looking forward to contributing together. :smiley: