mzummo/php-zbarcode

此软件包最新版本(dev-master)没有可用的许可信息。

php-zbarcode

维护者

详细信息

github.com/mzummo/php-zbarcode

源代码

安装: 342

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 131

语言:C

dev-master 2017-05-08 14:22 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:03:50 UTC


README

简单的扩展,用于从图片中读取条码

基本用法

<?php
/* Create new image object */
$image = new ZBarCodeImage("test.jpg");

/* Create a barcode scanner */
$scanner = new ZBarCodeScanner();

/* Scan the image */
$barcode = $scanner->scan($image);

/* Loop through possible barcodes */
if (!empty($barcode)) {
	foreach ($barcode as $code) {
		printf("Found type %s barcode with data %s\n", $code['type'], $code['data']);
	}
}
?>

tests/ 目录中的 EAN13 图片来自 http://en.wikipedia.org/wiki/File:Ean-13-5901234123457.png

依赖关系

ZBar http://zbar.sourceforge.net/

ImageMagick https://imagemagick.org.cn/