Home >Backend Development >C#.Net Tutorial >Detailed explanation of the differences between the three open source tools for QR codes
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:
Zxing (zxing.dll)
ThoughtWorks(ThoughtWorks.QRCode.dll)
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 settingThis problem is more complicated, there can be many tables, here is an overview
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.
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 logoThe 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 tutorialASP tutorialLi Yanhui ASP basic video tutorialThe 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!