Skip to content

baislsl/QRCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A QRCode Generator

This repository translate the input string inro QRCode and automatically generate a picture of the QRCode.

Main algorithm are translated from davidshimjs/qrcodejs to java.

The original project was built in IntelliJ IDEA under Ubuntu 16.04 LTS.

Screenshot

How to use

Include the QRCode package into the java code.

import QRCode.Draw.QRDrawPanel;

Generate QR image

new QRDrawPanel("https://github.com/baislsl/QRCode").draw();

You can define your QRErrorCorrectLevel by

import QRCode.util.QRErrorCorrectLevel;

final QRErrorCorrectLevel errorCorrectLevel = QRErrorCorrectLevel.H;
new QRDrawPanel("https://github.com/baislsl/QRCode", errorCorrectLevel).draw();

where QRErrorCorrectLevel is defined in QRErrorCorrectLevel.java as

public enum QRErrorCorrectLevel {
    M,
    L,
    H,
    Q
}

This repository use Swing to generate picture.

License

MIT License

Releases

No releases published

Packages

No packages published

Languages