tarfin-labs/zbar-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tarfin-labs/zbar-php

最新稳定版本:2.0.0

Composer 安装命令:

composer require tarfin-labs/zbar-php

包简介

zbar-php is a php package that provides an interface to the zbar bar-code reading library.

README 文档

README

Latest Version on Packagist GitHub Workflow Status Quality Score Total Downloads

Introduction

zbar-php is a php package that provides an interface to the zbar bar-code reading library.

Requirements

You should have zbar and imagemagick installed.

Installation

You can install the package via composer:

composer require tarfin-labs/zbar-php

Usage

Scanning bar-code or qr-code with zbar is simple.

$zbar = new \TarfinLabs\ZbarPhp\Zbar($imagePath);
$code = $zbar->scan();

Supported file formats: pdf, jpeg, jpg, svg and gif.

Here is how to get only the type of bar code.

$zbar = new \TarfinLabs\ZbarPhp\Zbar($imagePath);
$type = $zbar->type();

echo $type; // "EAN-13"

And this is how you get both.

$zbar = new \TarfinLabs\ZbarPhp\Zbar($imagePath);
$barCode = $zbar->decode();

echo $barCode->code(); // "1234567890128"
echo $barCode->type(); // "EAN-13"

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

Security

If you discover any security-related issues, please email development@tarfin.com instead of using the issue tracker.

Credits

License

zbar-php is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 83.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 2
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-09