PHPackages                             orlyapps/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. [Image &amp; Media](/categories/media)
4. /
5. orlyapps/zbar-qrdecoder

ActiveLibrary[Image &amp; Media](/categories/media)

orlyapps/zbar-qrdecoder
=======================

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

3.0.4(7y ago)11.5k1MITPHPPHP &gt;=5.5.0

Since Dec 1Pushed 5y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (20)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": {
   "orlyapps/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->getFormat(); // Outputs the barcode's format
echo $result->getText(); // 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

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~86 days

Recently: every ~143 days

Total

19

Last Release

2633d ago

Major Versions

1.3.8 → 2.0.02016-03-13

2.0.4 → 3.0.02019-02-28

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/151910418d1ae1eb29a6bbeb788ea67c1ee0c77a1c02a2a437372a52da5739c4?d=identicon)[orlyapps](/maintainers/orlyapps)

---

Top Contributors

[![robbiepaul](https://avatars.githubusercontent.com/u/2804149?v=4)](https://github.com/robbiepaul "robbiepaul (30 commits)")[![orlyapps](https://avatars.githubusercontent.com/u/5220826?v=4)](https://github.com/orlyapps "orlyapps (6 commits)")[![maestroprog](https://avatars.githubusercontent.com/u/13558383?v=4)](https://github.com/maestroprog "maestroprog (2 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/orlyapps-zbar-qrdecoder/health.svg)

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[robbiep/zbar-qrdecoder

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

3350.7k](/packages/robbiep-zbar-qrdecoder)[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)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[aminyazdanpanah/php-shaka

Shaka PHP is a library that uses Shaka Packager for DASH and HLS packaging and encryption, supporting Common Encryption for Widevine and other DRM Systems.

939.0k1](/packages/aminyazdanpanah-php-shaka)

PHPackages © 2026

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