QR 解码器可以在 Mac 上使用吗?

发布于 2024-07-06 15:37:49 字数 1833 浏览 9 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

要走干脆点 2024-07-13 15:37:49

使用brew,可以轻松安装二维码阅读器zbar。

brew install zbar

然后可以通过调用读取二维码:

zbarimg qrcode_file.png

另外@jm666,brew可以用来安装opencv

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.

能怎样 2024-07-13 15:37:49

不幸的是,最常用的库 libdecodeqr 依赖于 OpenCV (gtk2),并且编译起来太困难它在 OS X 上。(尝试编译它,因为 Image::DecodeQR perl 模块需要它 - 但不成功)。

幸运的是,找到了这个链接:http://macscripter.net/viewtopic.php?id=37404 引用下一条:

  1. 下载ZBar 源代码
  2. 解压缩 tarball,然后在终端窗口中打开生成的目录。
  3. 输入 ./configure --disable-video --without-python --without-gtk --without-qt 来配置构建过程,限制对 ImageMagick 的依赖。
  4. 输入“make”来调用构建过程。
  5. 键入“sudo make install”,然后在出现提示时输入管理员密码。

您将需要 ImageMagick 可以从 macports 安装。

安装 ZBar 后,您可以使用

zbarimg qrcode_file.png

在 OS X Mavericks 10.9.2(和 Lion/10.7.5)上测试的命令很好地解码 qrcode - 并且运行良好。 因为它只依赖于 ImageMagick(存在于 macports 中)——应该也可以在其他 OS X 版本上轻松“编译”。

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.

倾城月光淡如水﹏ 2024-07-13 15:37:49

有一个名为 ZBar 的开源命令行工具。 它将照片作为参数,并从图像中检测到的任何 QRCode 中提取信息。

开源项目 QR-Reader-Mac 提供了一个充当包装器的 Applescript 脚本到zbar。 您可以创建用于处理 QRCode 的脚本的快捷方式或创建服务,如下所述。 该脚本将自动在您的默认浏览器中打开 QRCode 中包含的 URL。

用法

qrreader

一步步

使用Homebrew 可以轻松安装 ZBar :

brew install zbar

要安装 QR-Reader-Mac:

  1. 打开 QR-Reader-Mac GitHub 项目页面< /a>,选择代码,并将项目下载为 ZIP 文件:


    在此输入图像描述

  2. 双击 ZIP 文件将其解压。

  3. 双击您要安装的工作流程。 应出现以下弹出窗口:

  4. 安装确认。

  5. 打开“系统偏好设置”,然后在“键盘”>“键盘”下添加 open_QRCode 服务的快捷方式。 快捷方式> 服务> 一般的:
    image

重要:注意QR-Reader-Mac 期望在 /usr/local/bin/zbarimg 中找到可执行文件“zbarimg”,这是 Homebrew 将安装它的标准路径。)

复制到剪贴板

QRCode2Clipboard .workflow 可用于将 QR 码的内容提取到剪贴板中。 它的安装方式与 open_QRCode.workflow 相同。

There is an open-source command line tool named ZBar. It takes a photo as an argument and extracts the information out of any QRCode that it detects in the image.

The open-source project QR-Reader-Mac provides an Applescript script that acts as a wrapper to zbar. You can create a shortcut to the script for processing QRCodes or create a service, as explained below. The script will automatically open the URL contained within the QRCode in your default browser.

Usage

qrreader

Step by step

ZBar can be easily installed with Homebrew:

brew install zbar

To install QR-Reader-Mac:

  1. Open the QR-Reader-Mac GitHub project page, select Code, and download the project as a ZIP file:

    enter image description here

  2. Double click the ZIP file to extract it.

  3. Double click the workflow you want to install. The following Pop-UP should appear:

  4. Confirm by pressing install.

  5. Open System Preferences and add a shortcut to the open_QRCode service under Keyboard > Shortcuts > Services > General:
    image

(Important: Note that QR-Reader-Mac expects to find the executable 'zbarimg' in /usr/local/bin/zbarimg, which is the standard path Homebrew will install it.)

Copy to Clipboard

The QRCode2Clipboard.workflow can be used to extract the content of the QR-Codes into the Clipboard. It can be installed in the same way as the open_QRCode.workflow.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文