QR code generation and parsing toolkit-zxing

Table of Contents 1 Introduction 2. Give an example 2.1 Add dependencies 2.2 Tools 2.3 Testing 3. Summary Today, when I was looking at an open source project, I found a tool class, a simple tool class for generating QR codes. It was very convenient to test it. Although it has not been used in […]

Java uses zxing to create QR code with text and logo

1.maven adds dependencies <!– QR code support package –> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.3.0</version> </dependency> <dependency> <groupId>net.glxn</groupId> <artifactId>qrgen</artifactId> <version>1.4</version> </dependency> 2. Use the toolbar directly to generate a QR code import com.google.zxing.*; import com.google.zxing.client.j2se.BufferedImageLuminanceSource; import com.google.zxing.common.BitMatrix; import com.google.zxing.common.HybridBinarizer; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import sun.font.FontDesignMetrics; import javax.imageio.ImageIO; import java.awt.*; import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; […]

Andorid implements QR code generation & scanning based on ZXing

Recently, I encountered the need to scan barcodes, and the process of searching for information was not so smooth. I made a note and recorded these two articles. The predecessors planted trees for future generations to enjoy the shade. Andorid implements QR code generation & amp; scanning based on ZXing Android implements barcode scanning based […]

Use zxing to generate QR code in springboot

Introduce pom <!–QR code dependency–> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.3.3</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>javase</artifactId> <version>3.3.3</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.28</version> <scope>provided</scope> </dependency> Core methods private static final int QRCODE_SIZE = 320; // QR code size, width and height are both 320 private static final String FORMAT_TYPE = “PNG”; // QR code image type /** * Get […]

Move the zxing-cpp example to my project Win32, VC compiles the static library /MT, /MTd and the dynamic link library /MD, /MDd to understand the C++ header file or naming conflict: put it in a separate class.

Why compile the library first instead of using it out of the box like other languages? Because c++ has many modes. Summary: First compile the library and examples without doing anything. Then change the example step by step according to my project type. It is normal to build a project alone. Putting it into the […]

Android quickly implements two-dimensional code scanning–Zxing

Reprinted from: https://blog.csdn.net/xch_yang/article/details/81327695 The most commonly used libraries for QR code scanning in Android are zxing and zbar. The address of the zxing project is https://github.com/zxing/zxing, and there are still many people maintaining it. zbar is mainly written in C. If you need speed, you can use zbar, but it is not being maintained at […]

Use zxing3.4.1 framework to add QR code scanning function

1. Add zxing to introduce dependencies Add in build.gradle(module): implementation ‘com.google.zxing:core:3.4.1’ implementation ‘com.journeyapps:zxing-android-embedded:4.2.0’ Since we want to use the camera resource, we also need to add the following three permissions in the tag of the AndroidManifest.xml file: <uses-permission android:name=”android.permission.CAMERA” /> <uses-feature android:name=”android.hardware.camera” /> <uses-feature android:name=”android.hardware.camera.autofocus” /> The first is the CAMERA permission, which allows an […]