Inkscape.org
Tips, Tricks, and Tutorials Tips needed: Fun with QR Codes
  1. #1
    moontan moontan @moontan

    Hi, sometimes I use Fukuchi Kentaro's qrencode script to generate QR codes, but I'd like to be able to change their looks – I would, for instance, like to turn the single square pixels of each code into circles or other shapes that don't mess with the functionality. However, I don't think the SVG files generated with the script consist of single squares, but rather contiguous paths clustering together several of the single squares. Is there a simple way to manipulate a QR code made with this script in such a way that the single ‘pixels’ are separate square shapes?

  2. #2
    Polygon Polygon @Polygon🌶

    No luck so far. My idea was: render a QR-code which is 50x50 pixel - make a bitmap copy (though the placement is pixel-perfect the  conversion shows anti-aliasing which can be turned off but the next step didn´t work either)  and let Inkscape autotrace via Pixelart but the process generates more than 4 times the amount of objects per pixel - which doesn´t makes sense to me. 🤷

  3. #3
    Paddy_CAD Paddy_CAD @Paddy_CAD

    I've done this in the distant past. The QR code is a 25x25 grid of black squares (low luminosity) on a white background (high luminosity). Create tiled clones over the bitmap. Use the [Trace] tab to omit clones where luminosity is high.

  4. #4
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Here's a tutorial using a random QR code. Warning! I have no idea what's encoded here. I copied it from https://fukuchi.org/works/qrencode/.

    Correction to my previous comment: QR codes can be many, many sizes. This one happens to be 25x25. Count the dots and adjust the tiled clones accordingly. https://en.wikipedia.org/wiki/QR_code

  5. #5
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Here's an updated template. I added a method to fit  tiles to the QR code grid, regardless of size. What fun!