Does this library generate correct images?

Help
2010-06-10
2013-04-25
  • prog rammer
    prog rammer
    2010-06-10

    When I try out, for instance, 
    QRcode::png("whatisup");

    It shows up on the page, but when I try the web-based do-it-yourself generators, such as http://qrcode.kaywa.com/ or http://delivr.com/qr-code-generator, I get different images than with this library.

    Is there a particular version of the 40 different versions that is now in use? (as explained at http://www.denso-wave.com/qrcode/qrgene2-e.html).

    Are the various different error levels supposed to  make a difference in what image you get?   They seemed to when I tried different ones with the QRcode::png call.
    Thanks,
    Steve

     
  • Version here means size of the matrix so bigger version number gives more place for data (longer byte stream) but bigger image size. Lib tries to use the smallest version possible - big enough to hold data+ecc.

    The more error correction code is added - the bigger image (because ECC data ads to raw data). On the other hand more ECC gives scaner more recovery data, so it is more resistant to scanner misalignment, code print errors, dirt etc.

    Also qr code have masking mechanism, with 8 different masks. Masking are needed to avoid creation of bigger areas of same-color points (all white or all black) - because it is difficult for scanner to sync. Each lib have freedom to choose one of this eight mask, and should weight witch one is the best. Because of that other libs may produce other image from the same data and settings. Inside code there are markers showing witch mask we are using so scanner can read any of 8 possible versions. Mask evaluation is expensive calculation, original C lib tested all 8 and chosed best. In this PHP implementation we pick randomly few masks and only test those to choose best, because it is A LOT faster. Take a look at qrconfig.php comments for more details.

    ps. sorry for late RE, but somehow SF did not notified me on new posts on forum :(