PHPackages                             robbiep/zbar-qrdecoder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. robbiep/zbar-qrdecoder

ActiveLibrary

robbiep/zbar-qrdecoder
======================

A PHP wrapper for Zbar. Decodes images/photos containing QR codes.

2.0.2(10y ago)3350.7k↓15.6%34[4 PRs](https://github.com/robbiepaul/zbar-qrdecoder/pulls)MITPHPPHP &gt;=5.5.0

Since Dec 1Pushed 4y ago3 watchersCompare

[ Source](https://github.com/robbiepaul/zbar-qrdecoder)[ Packagist](https://packagist.org/packages/robbiep/zbar-qrdecoder)[ RSS](/packages/robbiep-zbar-qrdecoder/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelogDependencies (3)Versions (17)Used By (0)

ZBar QR code decoder for PHP
============================

[](#zbar-qr-code-decoder-for-php)

[![Build Status](https://camo.githubusercontent.com/de043827c8187b9a48a4f74594bf33f622909850e960c583d3c9fe2d0a5e723a/68747470733a2f2f7472617669732d63692e6f72672f726f626269657061756c2f7a6261722d71726465636f6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/robbiepaul/zbar-qrdecoder) [![Latest Stable Version](https://camo.githubusercontent.com/2abf62794fa59b71e6bc949ce0fe538dcd3f6d37ef43944fb2b757a61725b625/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f7a6261722d71726465636f6465722f762f737461626c65)](https://packagist.org/packages/robbiep/zbar-qrdecoder) [![Total Downloads](https://camo.githubusercontent.com/ff8ba9294feb88c8a5305a3a50b8b4040fad7c705a46020d08da947f9e17f142/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f7a6261722d71726465636f6465722f646f776e6c6f616473)](https://packagist.org/packages/robbiep/zbar-qrdecoder) [![Latest Unstable Version](https://camo.githubusercontent.com/9b011094dd68f95e21ee905d9c0eb3310745cdc0f90234bcb20c37a71f93773f/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f7a6261722d71726465636f6465722f762f756e737461626c65)](https://packagist.org/packages/robbiep/zbar-qrdecoder) [![License](https://camo.githubusercontent.com/a7a4daf60c5e3bde07d000293c29628d48025d34c86c54dcff633d618f77ae16/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f7a6261722d71726465636f6465722f6c6963656e7365)](https://packagist.org/packages/robbiep/zbar-qrdecoder)

This is a PHP wrapper for `zbar-tools` - (only `zbarimg` at the moment). See .

Requirements
------------

[](#requirements)

- **zbar-tools** - To install on Ubuntu it's as easy as `sudo apt-get install zbar-tools`. See their [project page](http://zbar.sourceforge.net/) 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
------------

[](#installation)

Install this package through [Composer](https://getcomposer.org/).

Add this to your `composer.json` dependencies:

```
"require": {
   "robbiep/zbar-qrdecoder": "^2.0"
}
```

Run `composer install` to download the required files.

Usage
-----

[](#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...
--------------------------------

[](#if-youre-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)

[](#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
------------------------

[](#other-barcodes-supported)

- EAN\_13 / ISBN
- CODE\_39
- CODE\_128

Contributing
------------

[](#contributing)

1. Fork it
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 93.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~116 days

Total

16

Last Release

3254d ago

Major Versions

1.x-dev → 2.0.02016-03-13

PHP version history (2 changes)1.0PHP &gt;=5.4.0

2.0.1PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5343505ac3e552740fa206c04cf196df222208ea85cf01ac469dd84dd11af0ac?d=identicon)[robbiepaul](/maintainers/robbiepaul)

---

Top Contributors

[![robbiepaul](https://avatars.githubusercontent.com/u/2804149?v=4)](https://github.com/robbiepaul "robbiepaul (29 commits)")[![dudashuang](https://avatars.githubusercontent.com/u/18453914?v=4)](https://github.com/dudashuang "dudashuang (1 commits)")[![jtakakura](https://avatars.githubusercontent.com/u/640587?v=4)](https://github.com/jtakakura "jtakakura (1 commits)")

---

Tags

phpqrcodeqrlaraveldecodezbar

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/robbiep-zbar-qrdecoder/health.svg)

```
[![Health](https://phpackages.com/badges/robbiep-zbar-qrdecoder/health.svg)](https://phpackages.com/packages/robbiep-zbar-qrdecoder)
```

###  Alternatives

[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[tuncaybahadir/quar

A simple QR Code generation tool for your projects with Laravel 10, 11, 12 versions, php 8.2, 8.3, 8.4 and 8.5

6966.5k4](/packages/tuncaybahadir-quar)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[devtical/nova-qrcode-field

Nova QR code field

4560.6k2](/packages/devtical-nova-qrcode-field)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)[akira/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

431.4k](/packages/akira-laravel-qrcode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
