robbiep/zbar-qrdecoder
Larablocks Analysis
robbiep/zbar-qrdecoder works with any PHP project: the latest release (2.0.2, Mar 13, 2016) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Mar 13, 2016)
- 733 downloads a month (needs 10,000)
- 33 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Mar 13, 2016.
- No releases in the last 12 months.
- First released: Dec 1, 2014.
- Monthly downloads: 733, up 68% from six months ago.
- 8 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 26, 2026.
| Install | |
|---|---|
composer require robbiep/zbar-qrdecoder |
|
| Latest Version: | 2.0.2 |
| PHP: | >=5.5.0 |
| License: | MIT |
| Last Updated: | Aug 26, 2021 |
| Links: | GitHub · Packagist |
ZBar QR code decoder for PHP
This is a PHP wrapper for zbar-tools - (only zbarimg at the moment). See http://zbar.sourceforge.net/.
Requirements
- zbar-tools - To install on Ubuntu it's as easy as
sudo apt-get install zbar-tools. See their project page for more platforms. - ImageMagick - It's required by Zbar, I'm not sure if they bundle it or not so make sure you have it
Installation
Install this package through Composer.
Add this to your composer.json dependencies:
"require": {
"robbiep/zbar-qrdecoder": "^2.0"
}
Run composer install to download the required files.
Usage
require_once('vendor/autoload.php');
$ZbarDecoder = new RobbieP\ZbarQrdecoder\ZbarDecoder();
# Optionally change the path of the zbarimg executable if you need to (default: /usr/bin)
$ZbarDecoder->setPath('/usr/local/bin');
# Decode the image
$result = $ZbarDecoder->make('/a/path/to/image_with_barcode.jpg');
echo $result; // Outputs the decoded text
echo $result->format; // Outputs the barcode's format
echo $result->code; // 200 if it decoded a barcode OR 400 if it couldn't find a barcode.
If you're using it in Laravel...
I've included a ServiceProvider class and a config if you need to change any options. Yyou need to add the ServiceProvider to config/app.php
'providers' => array(
...
'RobbieP\ZbarQrdecoder\ZbarQrdecoderServiceProvider'
)
You may need to publish the config php artisan vendor:publish
Now you can use Zbar QR Decoder in your Laravel application!
Usage (in Laravel)
# Decode the image
$result = ZbarDecoder::make('/a/path/to/image_with_barcode.png');
echo $result; // Outputs the decoded text
echo $result->format; // Outputs the barcode's format
Other barcodes supported
- EAN_13 / ISBN
- CODE_39
- CODE_128
Contributing
- Fork it
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
Alternatives to robbiep/zbar-qrdecoder
A style-first QR code toolkit for Laravel: module and eye shapes, gradients, log...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 2.0.2 | >=5.5.0 | MIT | |
| 2.0.1 | >=5.5.0 | MIT | |
| 2.0.0 | >=5.4.0 | MIT | |
| 1.3.8 | >=5.4.0 | MIT | |
| 1.3.7 | >=5.4.0 | MIT | |
| 1.3.6 | >=5.4.0 | MIT | |
| 1.3.5 | >=5.4.0 | MIT | |
| 1.3.4 | >=5.4.0 | MIT | |
| 1.3.3 | >=5.4.0 | MIT | |
| 1.3.2 | >=5.4.0 | MIT | |
| 1.3.1 | >=5.4.0 | MIT | |
| 1.2 | >=5.4.0 | MIT | |
| 1.1 | >=5.4.0 | ||
| 1.0 | >=5.4.0 |