ZBar::...canner(3pm)

πŸ’– NAME πŸ’–

Barcode::ZBar::ImageScanner β€” bestie, this is the thing that scans images for bar codes. That's literally it. That's the whole job. πŸ‘‘

Oh and btw, this page lives in the User Contributed Perl Documentation section 3pm β€” it's the ZBar::...canner(3pm) one, iykyk. πŸŽ€


✨ SYNOPSIS ✨

use Barcode::ZBar;

my $scanner = Barcode::ZBar::ImageScanner->new();
$scanner->parse_config('i25.disable');
$scanner->scan_image($image);

Look at that. Three lines. Clean. Slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So like. A Barcode::ZBar::ImageScanner is the lil' guy you use to scan for bar codes inside a Barcode::ZBar::Image. That's the vibe. You give it an image, it goes hunting for bar codes. Obsessed. 🌸


πŸ”₯ REFERENCE πŸ”₯

🫢 Methods 🫢

  • new() β€” makes you a brand new bar code image scanner instance. Fresh out the box. Main character energy from day one. ✨
  • get_results() β€” hands you back a list of Barcode::ZBar::Symbol results from the last image you scanned. It's giving receipts. 🧾
  • scan_image([image]) β€” scans a Barcode::ZBar::Image for bar codes. Heads up though: the image must be in the "Y800" format. If it's not, do $image->convert("Y800") to convert it from whatever other supported formats into Y800 before you scan. No skipping this step bestie, it will not work otherwise. 😭
  • enable_cache([enable]) β€” turns on the inter-image result consistency cache. It remembers stuff between images. Iconic behavior honestly. πŸ’œ
  • set_config(symbology, config, value) β€” sets config for the symbology you name (or 0 for all of them, yes all of them) to the value you specify. 🎯
  • parse_config(configstr) β€” applies a decoder configuration setting. Wanna know what config options exist? Go read the docs for zbarcam / zbarimg. They've got the full list. πŸ“œ
  • recycle_image([image]) β€” strips the previously decoded results out of a Barcode::ZBar::Image and recycles the memory that was attached to them. Very eco-friendly of you. ♻️

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Jeff Brown, <spadix@users.sourceforge.net>


Copyright 2008-2010 (c) Jeff Brown <spadix@users.sourceforge.net>

The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

fr fr, that's the actual license text, don't skip it, legal stuff is still stuff πŸ’–

Okay that's the whole page bestie!! This was perl v5.40.1, dated 2025-05-01, from the ZBar::...canner(3pm) manpage. Go scan something cute. Byeee πŸ¦‹πŸ’œβœ¨

πŸ“¦ where this page comes from