2

I'm planning to implement a QR code on a poster that I'm designing, and it seems the most common way to do this is to use one of the many online generators out there, but they either don't allow me to customise the QR code enough or they do but require subscription to their service for it.

That's ideal for a graphic designer or marketing exec with not much technical knowhow, but as someone with a little programmatic experience I figure that there must be a way to generate a fully-featured QR code on my own without needing to pay anything. For example, my QR code needs to have a transparent background in order to go on a dark flyer, a feature that none of the online generators are good at doing even if some purport to support it.

Is it possible to generate my own QR codes?

Hashim Aziz
  • 13,835

2 Answers2

4

libqrencode is a library and qrencode is a command line utility for encoding data in a QR Code symbol.

I installed qrencode in my Kubuntu (from qrencode package) and successfully created a QR code as a PNG image.

Transparent background is not a job for encoder. Use qrencode/libqrencode to get a basic image; then use an image manipulation tool (e.g convert from ImageMagick) to adjust it to your needs. Example:

qrencode -o - 'https://superuser.com/a/1523436/432690' | convert - -transparent white foo.png

Note: I'm not sure I got your idea of transparent background right.

1

For windows/mac/linux, Inkscape has an extension by default. Look in Extensions/Render/Barcode/QR code.

The extension has a reference to the originator's web page, but I didn't dig deep to find an reference to Inkscape's extension on the site.

I did confirm that I can enter any text into the extension input dialog box to get a working QR code. My QR code reader (iOS) displayed the random text or asked me to visit any URL I entered.

The extension provides for block size giving you the ability to adjust size as desired. As a vector file, the background is transparent by default.

https://superuser.com/questions/1523429/how-can-i-create-my-own-qr-codes-for-free

The above QR is this post's URL.

It appears that there may be some massaging necessary if this is to be used on a vinyl cutter or laser cutter, as boundaries are visible between the individual black blocks making up the overall shape.

fred_dot_u
  • 2,902
  • 1
  • 15
  • 10