Search code examples
macosqr-codedecoder

QR decoder that works on mac?


Anyone know a QR decoder that works on mac or that might be online? I just need to decode one single image.


Solution

  • Unfortunately, the most used library libdecodeqr is depends on OpenCV (gtk2) and it is too hard to compile it on OS X. (Tried to compile it because it is needed by Image::DecodeQR perl module - but unsuccessful).

    Fortunately, found this link: http://macscripter.net/viewtopic.php?id=37404 from citing the next:

    1. Download the ZBar source code.
    2. Unpack the the tarball, and open the resulting directory in a Terminal window.
    3. Type ./configure --disable-video --without-python --without-gtk --without-qt to configure the build process, limiting dependencies to ImageMagick.
    4. Type "make" to invoke the build process.
    5. Type "sudo make install", and enter an administrator password when prompted.

    You will need ImageMagick what can be installed from macports.

    After installing the ZBar, you can nicely decode qrcode with a command

    zbarimg qrcode_file.png
    

    Tested on OS X Mavericks 10.9.2 (and Lion/10.7.5)- and works nicely. Becasue it only depends on ImageMagick (exists in macports)- should be easily "compilable" on other OS X versions too.