A cool QR code generation project

A cool QR code generation project

Another beautiful day!

A while ago, I planned to change the QR code of my public account to a cool one, but unfortunately many QR code editors on the market were not satisfactory.

The forage QR code is pretty cool, but it doesn’t produce a satisfactory effect.

So I went to the almighty github and finally found an open source QR code editor.

The project is called amazing-qr and currently has 8.8k stars on GitHub.

Overview

amazing-qr is developed in pure Python.

The project can generate three types of QR codes:

  • Ordinary QR code
  • Art QR code (supports custom background images)
  • Animated GIF QR code (supports custom background images)

Without further ado, let's take a look at the resulting effect.

Example

The QR codes we usually see are usually like this, ordinary QR codes:

The following cool QR codes can be generated through this project.

Black and white QR code:

Color Art QR Code:

QR code of animated gif:

Install

First you need to install the Python (Python 3) environment.

Then just use pip to install the project:

 pip install amzqr

use

Some usage parameters:

 #Summary
amzqr Words
[ - v { 1 , 2 , 3 , ... , 40 }]
[ - l { L , M , Q , H }]
[ -n output - filename ]
[ -d output - directory ]
[ -p picture_file ]
[ - c ]
[ - contrast ]
[ - bri brightness ]

(Words represents the text in the QR code)

Ordinary QR code:

 #1 Words
amzqr https://github.com

Enter a link or sentence as a parameter after the command, and then a corresponding QR code image file will be generated in the current directory of the program, named qrcode.png by default.

 #2 - v , - l
amzqr https://github.com -v 10 -l Q

The default side length depends on the length of the message you enter and the level of error correction used;

The default error correction level is the highest level, H.

Custom: If you want to control the edge length and error correction level use the -v and -l parameters.

  • -v controls the side length, the range is 1 to 40, the larger the number, the larger the side length;
  • -l controls the error correction level, ranging from L, M, Q, H, increasing from left to right.
 #3 - n , - damzqr https://github.com -n github_qr.jpg -d .../paths/

The default output file name is " qrcode.png ", and the default storage location is the current directory.

Custom: You can define the output name and location yourself. Note that files with the same name will overwrite the old ones.

  • -n controls the file name, the format can be .jpg, .png, .bmp, .gif;
  • -d controls the location.

Art QR code:

 #1 - pamzqr https://github.com -p github.jpg

The parameter -p is your customized background image, which is placed in the same directory and a black and white image will be generated.

 #2 - camzqr https://github.com -p github.jpg -c

Adding the -c parameter can change the generated image from black and white to color.

 #3 - con , - bri
amzqr https://github.com -p github.jpg [-c] -con 1.5 -bri 1.6
  • The parameter -con is used to adjust the contrast of the image. 1.0 represents the original image, smaller values ​​represent lower contrast, and larger values ​​represent lower contrast. The default value is 1.0.
  • The parameter -bri is used to adjust the brightness of the image. The rest of the usage and values ​​are the same as -con.

Animated GIF QR code:

The generation method of dynamic QR code is no different from the QR code with image mentioned above. You only need to use .gif format image to generate black and white or color dynamic QR code.

But please note that if you use the -n parameter to customize the output file name, remember that its format must also be .gif format.

The above is a simple usage.

Finally, the Github address is attached: https://github.com/x-hw/amazing-qr

<<:  Ten hidden tricks of WeChat that most people don’t know

>>:  Google recruitment information leaked: Android Studio can be used to develop Android systems

Recommend

Leeks, cut and grown again, are a favorite on Chinese tables

Written by Wei Shuihua Header image | TuChong Cre...

How do mobile phone users become crazy fans?

Can a mobile phone be used to express faith? The ...

Website promotion skills and methods, what are the steps for website promotion?

Many people say that SEO website optimization is ...

It has a detachable butt, and a brain on its butt! | Natural Trumpet

Welcome to the 48th issue of the Nature Trumpet c...

Event operation and promotion: How to plan the core gameplay?

As usual, let me give you a definition: Operating...

A review of the top 10 Douyin e-commerce cases of the year!

Douyin e-commerce in 2021 is like the American We...

From a global perspective, here are 4 tips to help you improve product activity

For all our promotions , we must identify the tar...

Getting Started with WatchKit: Creating a Simple Guessing Game

Editor's note: As you know, Apple has include...

Always want to "stick it"? Most likely you have skin hunger syndrome

Why do I always want to stick close to others? So...

Kobe Bryant endorses Ele.me, and it only takes five steps to pass the level!

These days, Kris Wu is the spokesperson for Honor...

Can eating sashimi with mustard kill insects? A must-read for seafood lovers!

Seafood is a favorite food for many people, and s...