QR Code Generator is a supportA QR code generator library for multiple programming languages, providing 6 programming languages ​​with almost the same functions: Java, TypeScript/JavaScript, Python, Rust, C++, C

Compared to other libraries of the same type, this repository has significantly shorter code but more documentation comments.


  • Supports encoding of all 40 versions (sizes) and all 4 error correction levels according to the QR Code Model 2 standard
  • Output format: Raw modules/pixel of QR symbols
  • Detect viewfinder-like penalty modes more accurately than other implementations
  • Numeric and special alphanumeric text can be encoded using a smaller size than normal text


The code below is written in Java, but other languages ​​are designed with basically the same API naming and behavior.

import java.awt.image.BufferedImage;
import java.io.File;
import java.util.List;
import javax.imageio.ImageIO;
import io.nayuki.qrcodegen.*;

// Simple operation
QrCode qr0 = QrCode.encodeText("Hello, world!", QrCode.Ecc.MEDIUM);
BufferedImage img = toImage(qr0, 4, 10);  // See QrCodeGeneratorDemo
ImageIO.write(img, "png", new File("qr-code.png"));

// Manual operation
List<QrSegment> segs = QrSegment.makeSegments("3141592653589793238462643383");
QrCode qr1 = QrCode.encodeSegments(segs, QrCode.Ecc.HIGH, 5, 5, 2, false);
for (int y = 0; y < qr1.size; y++) {
    for (int x = 0; x < qr1.size; x++) {
        (... paint qr1.getModule(x, y) ...)

#Code #Generator #Homepage #Documentation #Download #Code #Generator #Library #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *