Platforms to show: All Mac Windows Linux Cross-Platform

Back to BarcodeScannerMBS class.

BarcodeScannerMBS.Scan(p as picture) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Picture Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scans for a barcode on the picture.

The barcode is searched on the middle vertical line from the left to right.

So the picture you pass can be as small as just one pixel height.
The barcode should be horizontal centered in that picture for best results.

Returns true on success and false on failure.

See also:

BarcodeScannerMBS.Scan(p as picture, lines() as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Picture Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scans for a barcode on the picture.
Example
dim i as Integer
dim lines(-1) as Integer
dim b as BarcodeScannerMBS
dim p as Picture
// set b to your scanner and p to your picture

for i=0 to 99
lines.append i*10 // search every 10th line on a 1000 pixel high image.
next

if b.scan(p,lines) then
// ok
end if

The barcode is searched on the lines with the given offsets from the left to right.

The lines array must have at least one entry specifying the lines to search on.
If the values in the lines array are out of bounds, they are ignored. The first line has the value 0.

So the picture you pass can be as small as just one pixel height.
The barcode should be horizontal centered in that picture for best results.

Returns true on success and false on failure.

See also:

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


The biggest plugin in space...