This article mainly introduces the generation of two-dimensional code of the open Source Tool comparison, with the source code download, with a certain reference value, followed by a small series to see it
One day discovered that the tool that generated the QR code (zxing) was running slowly, and on the internet looking for tools to generate two-dimensional code, found that common open source workers have the following three kinds:
Zxing (Zxing.dll)
ThoughtWorks (ThoughtWorks.QRCode.dll)
Qrcodenet (Gma.QrCodeNet.Encoding.dll)
Which is the best choice? Then compare yourself manually.
First met a big pit, why people zxing use and their own use of different, later found that Zxing.dll actually have two versions, a 416kb, a more than 200 KB. We used to be more than 200 KB, efficiency is relatively slow, then use 416kb comparison bar
(zxing have two editions, called Zxing.dll, are generated two-dimensional code, may be the author or a person, but the use of the way and efficiency gap is too big, please look for 416kb version )
1. Support for encoded content length, as shown in the following table:
It can be seen that the thoughtworks has a length limit for the encoded content (which can be adjusted by setting, but it is very easy to be long) and has been kicked out. . )
2. Execution efficiency of three tools
Where: Twqr refers to THOUGHTWORKS,NETQR refers to qrcodenet. It can be seen that the ThoughtWorks executed is the fastest, and the zxing is twice times the qrcodenet , but the time is not very long. In addition to the ThoughtWorks, the other two will grow with the encoded content growing longer.
3. Comparison of generated file sizes:
The size of the file is qrcodenet smaller, and qrcodenet can even be sized to fit the content. And zxing the biggest, but the size of zxing is more than the other two.
(Zxing is to set the pixel size, so this is used here for 50x values, because only a multiple of 100 to ensure that the border setting and the actual generated border size match, while ThoughtWorks and qrcodenet set the value, the actual size is about 33x value, and the border value)
4. Border settings
The problem is more complicated, the table can be a lot of columns, here is an overview
ThoughtWorks default does not support borders, so he set the size is: 33x value +1
Qrcodenet support borderless, thin border, three kinds of thick border, so the size is: 29x value, 33x value, 37x value
Zxing size and border can be arbitrarily set, so zxing priority to guarantee the size, as the border is to meet the size of the border is not considered the size of the frame, according to the experience size is a multiple of 100 when the border is the best support .
5. Choice
The comparison is complete, what do the guys think? I prefer to choose zxing if I have to choose one. However, I would like to tell you that no one is elected, but to do a proxy mode, the external storm is their own interface , the bottom of your tube I use who, perhaps tomorrow I will change a more beautiful and better interface it.
6. I want to bring the logo
Two-dimensional code must be with logo, so I from the "Zhuge Merry" that stole the source code, will be placed on the attachment. Attachment is already a good proxy mode of the source code, if useful please praise, use good please leave a message.
"Recommended"
1.ASP Free Video Tutorial
2.ASP Tutorials
3. Eon the ASP Basic video tutorial