Generate QR code images in the QrenCode command line.

by longchamp69 on 2012-02-15 21:08:18

You should be familiar with QR codes, which are also known as 2-dimensional barcodes or QR Codes. This is a technology that uses graphics to record information. The most common application is in mobile apps. Users can quickly access the internet on their phones by scanning QR codes with their phone's camera or by entering the number or keyword below the QR code. They can conveniently browse web pages, download images, text, music, videos, and more. On Ubuntu/Linux, there is a command-line tool called QrenCode that can easily help us generate QR codes.

# Installation: `sudo apt-get install qrencode`

# Usage: `qrencode -o [filename.png] '[text/url/information to encode]'`

For example, to generate a QR code for this site:

`qrencode -o wowubuntu.png ''`

The output graphic looks like this. If you have a QR code recognition app installed on your phone, you can take a picture and recognize it.

If you want to customize the size, you can add the `-s` parameter. For example, `-s 6` indicates a size of 6x6 square pixels, as shown below.

`qrencode -o ~/Desktop/google.png -s 6 ''`

In addition, you can use many other parameters. For detailed usage, please refer to `man qrencode`.

- Source of information

Update: Recognizing QR codes from the command line:

# Install `libdecodeqr-examples`: `apt-get install libdecodeqr-examples`

Use `libdecodeqr-simpletest`. For example, recognizing the previously generated QR code image:

`libdecodeqr-simpletest wowubuntu.png`

Output result:

```

libdecodeqr-simpletest wowubuntu.png

libdecodeqr version 0.9.3 ($Rev: 42 $)

STATUS=2000

Hit any key to end.

```

Related thematic articles: Tolerant Depend