Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QR decoder that works on mac? [closed]

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

like image 456
fmsf Avatar asked Oct 16 '08 22:10

fmsf


People also ask

Can Mac read a QR code on screen?

When you run QR Right, you click the dock icon or the menubar icon to "scan" your Mac screen. Any detectable QR Codes or 1D barcodes are highlighted, with the decoded data right below them. If it's a URL, one more click will open that page in your default browser.

How do I create a QR code on my Macbook?

In Chrome on Windows, macOS or Chrome OS, right-click (or, with a touchpad: two finger tap) and select “Create QR code for this page” (as shown on the left) to generate a QR code you may scan or download (as shown on the right).


2 Answers

Using brew, it is easy to install zbar, a QR code reader.

brew install zbar

Then a QR code can be read by calling:

zbarimg qrcode_file.png

Also @jm666, brew can be used to install opencv.

like image 135
The Matt Avatar answered Oct 28 '22 16:10

The Matt


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.

like image 35
jm666 Avatar answered Oct 28 '22 16:10

jm666