Unfortunately, the most commonly used libdecodeqr library depends on OpenCV (gtk2), and it is difficult to compile it on OS X. (I tried to compile it because it was necessary for the Image::DecodeQR perl module, but was unsuccessful).
Fortunately, I found this link: http://macscripter.net/viewtopic.php?id=37404 with a link to the following:
- Download the ZBar source code .
- Unzip the archive and open the resulting directory in the terminal window.
- Type
./configure --disable-video --without-python --without-gtk --without-qt to customize the build process, limiting dependencies on ImageMagick. - Type "make" to invoke the build process.
- Type "sudo make install" and enter the administrator password when prompted.
You will need ImageMagick , which can be installed from macports .
After installing ZBar, you can beautifully decode qrcode with
zbarimg qrcode_file.png
Tested on OS X Mavericks 10.9.2 (and Lion / 10.7.5) - and it works beautifully. Becasue, it depends only on ImageMagick (exists in macports) - should be easily "compiled" in other versions of OS X.
jm666
source share