Platforms to show: All Mac Windows Linux Cross-Platform

ZBarMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Barcode MBS Barcode Plugin 21.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: The class for scanning barcodes with zbar.
Example:
// get some picture
Dim p As Picture = Picture.Open(file)
If p <> Nil Then

// scan it
Dim symbols() As ZBarMBS = ZBarMBS.Scan(p)

// show results
For Each symbol As ZBarMBS In symbols
MsgBox symbol.Name+": "+symbol.Text
Next
End If
Notes:
We can use the zbar library to scan pictures for barcodes in Xojo:

ZBar is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.

ZBar is licensed under the GNU LGPL 2.1 to enable development of both open source and commercial projects.

Since the library is under LGPL license, we can't embed it within the plugin and you need to provide a DLL/dylib/so file to the plugin to load library

zbar Homepage:
http://zbar.sourceforge.net
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Feedback, Comments & Corrections

Symbol Types

Constant Value Description
kSymbolTypeAddOn &h0700 add-on flag mask
kSymbolTypeAddOn2 &h0200 2-digit add-on flag
kSymbolTypeAddOn5 &h0500 5-digit add-on flag
kSymbolTypeCODE128 128 Code 128
kSymbolTypeCODE39 39 Code 39.
kSymbolTypeEAN13 13 EAN-13
kSymbolTypeEAN8 8 EAN-8
kSymbolTypeI25 25 Interleaved 2 of 5.
kSymbolTypeISBN10 10 ISBN-10 (from EAN-13).
kSymbolTypeISBN13 14 ISBN-13 (from EAN-13).
kSymbolTypeNone 0 no symbol decoded.
kSymbolTypePartial 1 intermediate status
kSymbolTypePDF417 57 PDF417.
kSymbolTypeQRCode 64 QR Code.
kSymbolTypeSymbol &h00ff mask for base symbol type
kSymbolTypeUPCA 12 UPC-A
kSymbolTypeUPCE 9 UPC-E

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine


The items on this page are in the following plugins: MBS Barcode Plugin.


XMPVersionInfoMBS   -   ZintRenderHexagonMBS

The biggest plugin in space...




Links
MBS Xojo Plugins

Start Chat