Comparison of open-source tools for generating QR codes (with source code), comparison of open-source tools with source code

Source: Internet
Author: User

Comparison of open-source tools for generating QR codes (with source code), comparison of open-source tools with source code

One day, zxing was found to be slow. As a result, it was found that there were 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 manually compare them.

First of all, I encountered a big pitfall. Why is zxing used in different ways? Later I found that zxing. dll has two versions, one is 416kb and the other is more than 200 kb. We used to use more than 200 kb, and the efficiency is relatively slow. So we can use the kb comparison.

(There are two versions of zxing, both called zxing. dll, which generate two-dimensional codes. The author may still be a person, but the difference in usage and efficiency is too large. Please refer to version 416kb.)

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

It can be seen that ThoughtWorks has a limit on the length of the encoding content (you can adjust the length through the settings, but it is still very easy to exceed the length), basically has been kicked out.)

2. execution efficiency of the three tools

Twqr refers to ThoughtWorks and netqr refers to QrCodeNet. It can be seen that the efficiency of ThoughtWorks is the fastest, andZxing is twice that of QrCodeNet.But the time is not long. In addition to ThoughtWorks, the other two will grow with the encoded content.

3. Compare the size of the generated file:

The file size QrCodeNet is smaller, and QrCodeNet can be adjusted based on the Content size. Zxing is the largest, but Zxing is larger than Zxing.

(Zxing is used to set the pixel size. Therefore, it is used to set the value 50x. Only a multiple of 100 can ensure that the setting of the border is consistent with the actual size of the generated border. ThoughtWorks and QrCodeNet are used to set the value, the actual size is about 33x, which is related to the border value)

4. Border settings

This problem is complex and can be listed in many tables.

  • ThoughtWorks does not support borders by default, so it is set to: 33x value + 1
  • QrCodeNet supports three types of borders: no border, fine border, and coarse border. Therefore, the size is set to 29x, 33x, and 37x.
  • Zxing sizes and borders can be set at will, soZxing gives priority to ensure the size of the border. The size of the border is considered only after the size of the border is satisfied. Based on experience, the border supports the best size 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 want to select one, I prefer Zxing.. But I 'd like to tell you that no one chooses,Instead, the proxy mode exposes its own interface.Who are you using at the bottom? Maybe tomorrow I will change to a better and better interface.

6. I want to bring a logo

The QR code must contain a logo, so I stole the source code from "Zhuge Wind" and put it on the attachment. The source code of proxy mode is already provided in the attachment. If it is useful, click like. If it is useful, leave a message.

Source code download: http://wd.jb51.net: 81 // 201701/yuanma/QRCreater_jb51.rar

The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.