Skip to content

logicsquad/qr4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

QR4J

What is this?

QR4J is a Java library for generating QR codes. QR4J is intended to be:

  • self-contained: no network API hits to any external services; and

  • minimally-dependent: using QR4J should not involve pulling in a plethora of JARs, and ideally none at all.

QR4J is not intended to:

  • read QR codes; or

  • generate any other type of barcode.

Getting started

Generating a QR code is this simple:

QrCode qr = QrCode.encodeText("Hello, world!", QrCode.Ecc.LOW);
BufferedImage img = qr.toImage(10, 4);
File imgFile = new File("hello-world-QR.png");
ImageIO.write(img, "png", imgFile);

Or in a web application, you could just return SVG:

return qr.toSvg(4, "#cccccc", "#333333");

Using QR4J

You can use QR4J in your projects by including it as a Maven dependency:

<dependency>
  <groupId>net.logicsquad</groupId>
  <artifactId>qr4j</artifactId>
  <version>1.0</version>
</dependency>

Roadmap

The following are some potential ideas for future releases:

  1. It would certainly be great to have more unit tests.

Contributing

By all means, open issue tickets and pull requests if you have something to contribute.

References

QR4J is heavily based on QR Code generator library, specifically the io.nayuki.fastqrcodegen package.

  • Why not fork that project? Because the repository includes implementations in languages we're not interested in.

  • Why not use that project's Java release? Because it doesn't appear that the io.nayuki.fastqrcodegen package is even released as a JAR available on Maven Central.

About

A Java-based QR code generator with a minimum of dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages