33

Who knows how to generate qr-code? And how to decorate like here http://mojiq.kazina.com/?

Yanker
  • 429
  • 1
  • 6
  • 9
  • 2
    All I wanted to know is if it uses compression or not, or how does it deal with reducing the data size, but I'm quite disappoint: are we really asking questions so that people just answers "read the ISO document" ? – jokoon Sep 23 '11 at 18:43
  • (advertising:) There's a documented Lua library that encodes data into QRCodes: http://speedata.github.com/luaqrcode/ – topskip Feb 12 '13 at 09:40

4 Answers4

32

try this tutorial http://www.thonky.com/qr-code-tutorial/, very good in-depth tutorial on creating QR-codes, but only for a certain type of QR-code.

sschrass
  • 7,014
  • 6
  • 43
  • 62
  • 2
    Beware, there seems to be a few errors in the tutorial. The generated QR code and the page "Show polynomial division steps" look very suspicious to me. (For example (α * α^210) is not α^210, but α^211.) Otherwise an excellent resource. – topskip Dec 19 '12 at 20:54
  • back then, when I stepped through this tutorial those parts didn't exist. Basically those parts were my idea, since I had some serious trouble with them. But think it must be a typo, because (for me) everything works just fine. – sschrass Dec 19 '12 at 21:59
  • One implementation, based partially on the thornky tutorial mentioned above is located [here](https://github.com/shieldui/shieldui-lite). An example of a jquery plugin using this approach is available [here](http://demos.shieldui.com/web/qrcode/api). – David Johnson Jul 03 '15 at 12:09
9

Most of the time, the problem is the Finite-Field arithmetic, because it is a little bit different. And once you have the generator working, the error-correction techniques make it harder to see if the code is generated correctly. There is another site which has ECC generator: http://www.pclviewer.com/rs2/calculator.html But note that this generator also does not work correctly in all cases, same as Thonky's error code correction generator.

A small project I made allows step-by-step debugging and following the creation of the QRCode and manually changing all the parameters - something no generator on web does. The link: https://github.com/Legoless/QRCode

Legoless
  • 10,942
  • 7
  • 48
  • 68
1

you can use the JavaScript implementation of a QR symbology, which is part of the ShieldUI open source package available here. You can see a jquery QR plugin implementation based on it in the following demo.

1

You can use ZXing's GAE app to generate QR codes in a browser, or download the Java library and use the zxing.appspot.com component in your own code.

Matt Ball
  • 354,903
  • 100
  • 647
  • 710
  • 3
    Thank you, but I am interested in the mathematical algorithm – Yanker Mar 27 '11 at 09:01
  • Start by reading [this](http://code.google.com/p/zxing/wiki/BarcodeContents), or you can browse the ZXing source code to see how they implement it. – Matt Ball Mar 27 '11 at 13:14
  • Basic encoder classes: [`com.google.zxing.qrcode.encoder`](http://code.google.com/p/zxing/source/browse/trunk/core/src/com/google/zxing/qrcode/encoder/). Specifically, see [`Encoder.java`](http://code.google.com/p/zxing/source/browse/trunk/core/src/com/google/zxing/qrcode/encoder/Encoder.java). – Matt Ball Mar 27 '11 at 14:12
  • Ok it's first step. How transformate this message in QR-code. I found [link](http://en.wikipedia.org/wiki/File:QR_Code_Structure_Example.svg) and I now that QR-code use Reed-Solomon Code for Error Correction. – Yanker Mar 27 '11 at 14:14
  • Could you clarify that? I don't understand what you mean by "How transformate this message in QR-code." – Matt Ball Mar 27 '11 at 14:15
  • I have text message. For Qr-code I need to encode this message to binary. For example, in barcode use encoding table. And how encode format information and version information? – Yanker Mar 27 '11 at 14:45