mzummo / php-zbarcode
php-zbarcode
Installs: 351
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 129
Language:C
pkg:composer/mzummo/php-zbarcode
This package is not auto-updated.
Last update: 2025-10-26 01:33:08 UTC
README
Simple extension to read barcodes from images
Basic usage:
<?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']);
}
}
?>
The EAN13 image in the tests/ directory is from http://en.wikipedia.org/wiki/File:Ean-13-5901234123457.png
Dependencies:
ZBar http://zbar.sourceforge.net/
ImageMagick http://www.imagemagick.org/