Home Backend Development C#.Net Tutorial Detailed explanation of the differences between the three open source tools for QR codes

Detailed explanation of the differences between the three open source tools for QR codes

May 08, 2017 am 09:35 AM
QR code tool Open source

This article mainly introduces the comparison of open source tools for generating QR codes. The source code is attached for download, which has a certain reference value. Let’s take a look at it with the editor.

One day I found a way to generate QR codes. The tool (zxing) ran very slowly, so I went online to look for tools to generate QR codes, and found that there are three common open source tools:

  1. Zxing (zxing.dll)

  2. ThoughtWorks(ThoughtWorks.QRCode.dll)

  3. ##QrCodeNet(Gma.QrCodeNet.Encoding.dll)

Which one is better? Then compare it manually yourself.

First of all, I encountered a big pitfall, why the way other people use zxing is different from my own. Later I found out that there are actually two versions of zxing.dll, one is 416kb, and the other is more than 200kb. We originally used the 200kb version, which was relatively slow, so let’s use the 416kb version for comparison

(

zxing has two versions, both called zxing.dll, both generate two-dimensional Coded, maybe the author is still the same person, but the difference in usage and efficiency is too big, please look for the 416kb version)

1. Support for the length of the encoded content , as shown in the following table:

It can be seen that ThoughtWorks has a length limit for encoding content (can be adjusted through settings, but it is still easy Super long), has basically been kicked out. )

2. Execution efficiency of the three tools

##Among them: twqr refers to ThoughtWorks, netqr refers to QrCodeNet. It can be seen that ThoughtWorks, which has been out, has the fastest execution efficiency, while

Zxing is 2 times that of QrCodeNet, but the time is not very long. Except for ThoughtWorks, the other two will grow as the encoded content becomes longer.

3. Comparison of generated file sizes:

The file size of QrCodeNet is smaller, and QrCodeNet can even adjust the size according to the content size . Zxing is the largest, but its size is also larger than the other two.

(zxing sets the pixel size, so the 50x value is used here, because only multiples of 100 can ensure that the border setting is consistent with the actual generated border size; while ThoughtWorks and QrCodeNet set the value, the actual size is about It is a 33x value, related to the border value)

4. Border setting

This problem is more complicated, there can be many tables, here is an overview

    ThoughtWorks does not support borders by default, so the size he sets is: 33x value + 1
  • QrCodeNet supports no border, thin border, and thick border, so The set sizes are: 29x value, 33x value, 37x value
  • Zxing size and border can be set arbitrarily, so
  • zxing gives priority to ensuring the size. As for the border, it is to satisfy The size of the border will be considered after the size. According to experience, the border support is best when the size is a multiple of 100.

5. Choice

The comparison has been completed, which one do you think you should choose?

If I had to choose one, I would prefer Zxing. But what I want to tell you more is that no one chooses, but to make a proxy model, and what is exposed to the outside world is its own interface , you don’t care who I use at the bottom, maybe I will change it to a more beautiful and better interface tomorrow.

6. I want to bring a logo

The QR code must have a logo, so I stole the source code from "Zhuge Fengliu" and will put it in the attachment. The source code of the proxy mode has been prepared in the attachment. If it is useful, please like it. If you use it well, please leave a message.

【Related recommendations】

1.

ASP free video tutorial

2.

ASP tutorial

3.

Li Yanhui ASP basic video tutorial

The above is the detailed content of Detailed explanation of the differences between the three open source tools for QR codes. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to optimize the performance of debian readdir How to optimize the performance of debian readdir Apr 13, 2025 am 08:48 AM

In Debian systems, readdir system calls are used to read directory contents. If its performance is not good, try the following optimization strategy: Simplify the number of directory files: Split large directories into multiple small directories as much as possible, reducing the number of items processed per readdir call. Enable directory content caching: build a cache mechanism, update the cache regularly or when directory content changes, and reduce frequent calls to readdir. Memory caches (such as Memcached or Redis) or local caches (such as files or databases) can be considered. Adopt efficient data structure: If you implement directory traversal by yourself, select more efficient data structures (such as hash tables instead of linear search) to store and access directory information

How Debian improves Hadoop data processing speed How Debian improves Hadoop data processing speed Apr 13, 2025 am 11:54 AM

This article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file

How to use Nginx logs to improve website speed How to use Nginx logs to improve website speed Apr 13, 2025 am 09:09 AM

Website performance optimization is inseparable from in-depth analysis of access logs. Nginx log records the detailed information of users visiting the website. Cleverly using this data can effectively improve the speed of the website. This article will introduce several website performance optimization methods based on Nginx logs. 1. User behavior analysis and optimization. By analyzing the Nginx log, we can gain a deep understanding of user behavior and make targeted optimization based on this: High-frequency access IP identification: Find the IP address with the highest access frequency, and optimize the server resource configuration for these IP addresses, such as increasing bandwidth or improving the response speed of specific content. Status code analysis: analyze the frequency of different HTTP status codes (such as 404 errors), find out problems in website navigation or content management, and proceed

How Debian OpenSSL prevents man-in-the-middle attacks How Debian OpenSSL prevents man-in-the-middle attacks Apr 13, 2025 am 10:30 AM

In Debian systems, OpenSSL is an important library for encryption, decryption and certificate management. To prevent a man-in-the-middle attack (MITM), the following measures can be taken: Use HTTPS: Ensure that all network requests use the HTTPS protocol instead of HTTP. HTTPS uses TLS (Transport Layer Security Protocol) to encrypt communication data to ensure that the data is not stolen or tampered during transmission. Verify server certificate: Manually verify the server certificate on the client to ensure it is trustworthy. The server can be manually verified through the delegate method of URLSession

Debian mail server SSL certificate installation method Debian mail server SSL certificate installation method Apr 13, 2025 am 11:39 AM

The steps to install an SSL certificate on the Debian mail server are as follows: 1. Install the OpenSSL toolkit First, make sure that the OpenSSL toolkit is already installed on your system. If not installed, you can use the following command to install: sudoapt-getupdatesudoapt-getinstallopenssl2. Generate private key and certificate request Next, use OpenSSL to generate a 2048-bit RSA private key and a certificate request (CSR): openss

How debian readdir integrates with other tools How debian readdir integrates with other tools Apr 13, 2025 am 09:42 AM

The readdir function in the Debian system is a system call used to read directory contents and is often used in C programming. This article will explain how to integrate readdir with other tools to enhance its functionality. Method 1: Combining C language program and pipeline First, write a C program to call the readdir function and output the result: #include#include#include#includeintmain(intargc,char*argv[]){DIR*dir;structdirent*entry;if(argc!=2){

How to upgrade Zookeeper version on Debian How to upgrade Zookeeper version on Debian Apr 13, 2025 am 10:42 AM

Upgrading the Zookeeper version on Debian system can follow the steps below: 1. Backing up the existing configuration and data Before any upgrade, it is strongly recommended to back up the existing Zookeeper configuration files and data directories. sudocp-r/var/lib/zookeeper/var/lib/zookeeper_backupsudocp/etc/zookeeper/conf/zoo.cfg/etc/zookeeper/conf/zookeeper/z

How to recycle packages that are no longer used How to recycle packages that are no longer used Apr 13, 2025 am 08:51 AM

This article describes how to clean useless software packages and free up disk space in the Debian system. Step 1: Update the package list Make sure your package list is up to date: sudoaptupdate Step 2: View installed packages Use the following command to view all installed packages: dpkg--get-selections|grep-vdeinstall Step 3: Identify redundant packages Use the aptitude tool to find packages that are no longer needed. aptitude will provide suggestions to help you safely delete packages: sudoaptitudesearch '~pimportant' This command lists the tags

See all articles