codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

Feed your curiosity

How to create your own QR code programmatically

QR code is quite popular today. We see them everywhere. Ever curious how QR code works and how we can create them?

Donald Le
codeburst
Published in
4 min readJul 30, 2020

--

Photo by Hillary Black on Unsplash

Standing for “Quick Response code”, QR code is a code that is quickly readable by a cell phone (taking only 1–2 seconds to be processed). It has a wide range of uses across all types of industries such as retail, marketing, and logistics. QR code is a type of matrix barcode (or two-dimensional barcode) first designed in 1994 for the automotive industry in Japan, that used four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to store data efficiently (extensions may also be used). When we look at it, we see black squares arranged in a square grid on a white background, which can be read by an imaging device such as a camera, and processed using Reed–Solomon error correction until the image can be appropriately interpreted. The required data is then extracted from patterns that are present in both horizontal and vertical components of the image.

While QR Codes and Barcodes are similar in practice, QR Codes contain more information because they have the ability to hold information both horizontally and vertically. Barcodes only use horizontal information. While Barcodes work wonderfully for situations like scanning supermarket items, QR Codes have a much higher capability of transferring information, likely what has made them increasingly popular due to their versatility.

So how do we create QR-code

An easy approach would be to go to a website or mobile application that has the functionality support users to create QR code. The sites or mobile application can be :

  • The QR-code generator
  • QR code generator Android App

Or if you are curious like me, we can create QR code programmatically in any Programming Languages. For this demonstration, we will create a QR code in Python. Below is what we need to prepare:

  • Python3
  • Any Code Editor / IDE
  • Python Virtual Environment (venv)
  • QR-code library in Python

--

--

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Responses (1)

Write a response