QR CODE library for Processing 3.0.2 Windows/Linux/MacOSX/Android.. writeQR() and readQR().

Hello world processing, after mourn the absence of image awt Buffered and Android in general I decided to create a proprietary solution for scanning QR codes from Android devices. I leave you two examples of use, one to read an image and get the String containing the QR code and other writing the QR image from a String. Let's enjoy it!!!!

Works perfectly on Windows and Android, in Linux and MacOSX I have not tested but should work.

DOWNLOAD: https://www.dropbox.com/s/jezpiz9dhb3aidd/QRLib.rar?dl=0

//EXAMPLE 01: WriteQR:
        PImage img;
        String msg = "QR Writer example by Luis Lopez Martinez - Erkosone -";
        void setup(){
          size(640, 480, P2D);
          writeQR(msg, dataPath("test.png"));
        }
        void draw() {
          background(0);
          if(img == null){
            img = loadImage("test.png");
          }
          else{
            image(img, 0, 0);
          }
          textAlign(LEFT, CENTER);
          fill(#FFFFFF);
          text("Encoded text: " + msg, 10, 150);
        }

//EXAMPLE 02: ReadQR:
    PImage img;
    String msg = "";
    void setup(){
      size(640, 480, P2D);
      //msg = readQR("test.png");
      img = loadImage("test.png");
      msg = readQR(img); 
    }
    void draw() {
      background(0);
      imageMode(CORNER);
      image(img, 0, 0);
      textAlign(LEFT, CENTER);
      fill(#FFFFFF);
      text("Decoded text: " + msg, 10, 150);
    }

Comments

  • Hi! Great work! It works like a charm. Did you also have any luck when combining it with Ketai Camera? I can't seem to get it to work with the camera in my phone. I have enabled the right permissions...

  • Can you post your ketai code that you have tried so far?

    Kf

  • Hello ! I'm exactly looking for this library but your download link is dead, is it possible to fix this issue ? Or you can aslo send it to me ? Thank you.

  • Hi!, new download link on first post ;)

Sign In or Register to comment.