barcode provides a wrapper around zbar for reading barcodes from
images. For the time being, it only supports reading from images
and not any of zbar's more esoteric features like GUI display and
reading directly from barcode scanners or video inputs. I probably
won't implement any further features as I don't have any need for
them, but feel free to submit a pull request if you need them and
want to wrap them yourself.
Because this package uses cgo, it links its dependencies
dynamically by default. To compile you'll need the zbar C library
and headers installed, and you'll need the library installed to run
binaries compiled with this package.
To read codes from an image, simply instantiate an Image (you can
create one from any image.Image) and then pass it to an
ImageScanner. For example: