{"id":21314460,"url":"https://github.com/polyconseil/zbarlight","last_synced_at":"2025-04-05T03:12:32.783Z","repository":{"id":24515413,"uuid":"27921304","full_name":"Polyconseil/zbarlight","owner":"Polyconseil","description":"A simple wrapper for zbar","archived":false,"fork":false,"pushed_at":"2024-06-22T11:59:44.000Z","size":106,"stargazers_count":165,"open_issues_count":12,"forks_count":36,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-03-29T02:06:27.274Z","etag":null,"topics":["python","qrcode-reader","zbar"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Polyconseil.png","metadata":{"files":{"readme":"README.rst","changelog":"Changelog.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-12T13:23:04.000Z","updated_at":"2025-03-25T08:29:43.000Z","dependencies_parsed_at":"2024-12-14T17:02:40.862Z","dependency_job_id":"3ce1c541-e6e6-4810-a82c-2f4e07c3b6f8","html_url":"https://github.com/Polyconseil/zbarlight","commit_stats":{"total_commits":78,"total_committers":5,"mean_commits":15.6,"dds":0.05128205128205132,"last_synced_commit":"59802c6752e1fee84fe6310391dbde7f9b495f69"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fzbarlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fzbarlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fzbarlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fzbarlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polyconseil","download_url":"https://codeload.github.com/Polyconseil/zbarlight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","qrcode-reader","zbar"],"created_at":"2024-11-21T18:13:07.403Z","updated_at":"2025-04-05T03:12:32.767Z","avatar_url":"https://github.com/Polyconseil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ZbarLight\n=========\n\n``zbarlight`` is a simple wrapper for the zbar library. For now, it can read all zbar supported codes. Contributions,\nsuggestions and pull requests are welcome.\n\n``zbarlight`` is hosted on Github at \u003chttps://github.com/Polyconseil/zbarlight/\u003e.\n\nInstallation\n============\n\nYou need to install ZBar Bar Code Reader \u003chttp://zbar.sourceforge.net/\u003e and its headers before installing ``zbarlight``.\n\nOn Debian\n~~~~~~~~~\n\n.. code-block:: console\n\n    $ apt-get install libzbar0 libzbar-dev\n    $ pip install zbarlight  # you can also use setuptools directly\n\nOn Mac OS X\n~~~~~~~~~~~\n\n.. code-block:: console\n\n    $ brew install zbar\n    $ export LDFLAGS=\"-L$(brew --prefix zbar)/lib\"\n    $ export CFLAGS=\"-I$(brew --prefix zbar)/include\"\n    $ pip install zbarlight\n\nOn Windows\n~~~~~~~~~~\n\nInstruction can be found on \u003chttps://gist.github.com/Zephor5/aea563808d80f488310869b69661f330\u003e.\n\nHow To use ZbarLight\n====================\n\n.. code-block:: python\n\n    from PIL import Image\n    import zbarlight\n\n    file_path = './tests/fixtures/two_qr_codes.png'\n    with open(file_path, 'rb') as image_file:\n        image = Image.open(image_file)\n        image.load()\n\n    codes = zbarlight.scan_codes(['qrcode'], image)\n    print('QR codes: %s' % codes)\n\nTroubleshooting\n===============\n\nIn some case ``zbarlight`` will not be able to detect the 1D or 2D code in an image, one of the known cause is that the\nimage background color is the same as the foreground color after conversion to grey scale (it's happen on images with\nalpha channel). You can use the ``copy_image_on_background`` function to add a background color on your image.\n\n.. code-block:: python\n\n    from PIL import Image\n    import zbarlight\n\n    file_path = './tests/fixtures/two_qr_codes.png'\n    with open(file_path, 'rb') as image_file:\n        image = Image.open(image_file)\n        image.load()\n\n    new_image = zbarlight.copy_image_on_background(image, color=zbarlight.WHITE)  # \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c Add this line \u003c\u003c\u003c\u003c\n    codes = zbarlight.scan_codes(['qrcode'], new_image)\n    print('QR codes: %s' % codes)\n\nSome other cases without known solutions are show in the ``scan_codes()`` tests (search for the expected failures). Any\nclues on these cases is welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyconseil%2Fzbarlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyconseil%2Fzbarlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyconseil%2Fzbarlight/lists"}