Set result type from MWB_scanGrayscaleImage
Users now can choose between getting raw result bytes as a result of image scan, or
byte representation of complex result structure containing all information about the
scanned barcode.

MWBsetScanningRect

Sets rectangular area for barcode scanning with selected single decoder type.
After MWB_setScanningRect() call, all subseqent scans will be restricted
to this region. If rectangle is not set, whole image is scanned.
Also, if width or height is zero, whole image is scanned.
Parameters are interpreted as percentage of image dimensions, i.e. ranges are
0 - 100 for all parameters.

Parameters:

codeMask - Single decoder type selector (MWB_CODE_MASK_...)

left - X coordinate of left edge (percentage)

top - Y coordinate of top edge (percentage)

width - Rectangle witdh (x axis) (percentage)

height - Rectangle height (y axis) (percentage)

Returns:

MWB_RT_OK Rectangle set successfully

MWBgetScanningRectArray

public static float[] MWBgetScanningRectArray(int codeMask)

Get rectangular area for barcode scanning with selected single or multiple decoder type(s).
If codeMask is 0, union rectangle of all ACTIVE barcode types will be returned
Output values are in percentages of screeen width and height (range 0 - 100)

MWBregisterSDK

Registers licensing information for all SDK functionality.
It should be called once on app startup.

Parameters:

key - License key string

context - Activity/Context

Returns:

MWB_RT_OK Registration successful

MWBgetDeviceID

public static java.lang.String MWBgetDeviceID()

Get device ID.
It should be called after registering call, and works only on iOS and Android.

Returns:

non NULL ID of device

MWBsetActiveCodes

public static int MWBsetActiveCodes(int codeMask)

Sets active or inactive status of decoder types and updates decoder execution priority list.
Upon library load, all decoder types are inactive by default. User must call this function
at least once to choose active set of active decoders.

MWBenableSubcode

Enable subcode for given code group flag.
Subcodes under some decoder type are all activated by default.

Parameters:

codeMask - Single decoder type/group (MWB_CODE_MASK_...)

subMask - Flag of requested decoder subtype (MWB_SUBC_MASK_)

Returns:

MWB_RT_OK Activation successful

MWBdisableSubcode

public static int MWBdisableSubcode(int codeMask,
int subMask)

Disable subcode for given code group flag.

Parameters:

codeMask - Single decoder type/group (MWB_CODE_MASK_...)

subMask - Flag of requested decoder subtype (MWB_SUBC_MASK_)

Returns:

MWB_RT_OK Deactivation successful

MWBcleanupLib

public static int MWBcleanupLib()

Free memory resources allocated by library.
Should be invoked when library is not needed anymore, which is typically
at application closing time.
This cleanup is not necessary on most platforms, as memory resources are
deallocated automatically by operating system.

Returns:

MWB_RT_OK Success

MWBgetLastType

public static int MWBgetLastType()

Retrieves actual detected code type after successful MWB_scanGrayscaleImage call.
If last call was not successful, it will return FOUND_NONE.

MWBisLastGS1

MWBscanGrayscaleImage

Main scan function. Invokes all activated decoders by priority.
For successful scan, allocates byte array and passes it to user.

Parameters:

gray - Byte array representing grayscale value of image pixels.
Array should be stored in row after row fashion, starting with top row.

width - X axis size (width) of image.

height - Y axis size (length) of image.

Returns:

byte array of length greater than 0 On successful decode, library allocates new byte array where it stores
the decoded result.

MWBsetFlags

public static int MWBsetFlags(int codeMask,
int flags)

Configure options for single barcode type.
MWB_setFlags configures options (if any) for decoder type specified in a codeMask.
Options are given in a flags as bitwise OR of option bits. Available options depend on selected decoder type.

MWBsetLevel

public static int MWBsetLevel(int level)

Configure global library effort level
Barcode detector relies on image processing and geometry interpolation for
extracting optimal data for decoding. Higher effort level involves more processing
and intermediate parameter values, thus increasing probability of successful
detection with low quality images, but also consuming more CPU time.
Although level is global on library level, each decoder type has its
own parameter set for each level.

MWBsetResultType

public static int MWBsetResultType(int resultType)

Set result type from MWB_scanGrayscaleImage
Users now can choose between getting raw result bytes as a result of image scan, or
byte representation of complex result structure containing all information about the
scanned barcode.

MWBsetScanningRect

public static int MWBsetScanningRect(int codeMask,
Rect rect)

Sets rectangular area for barcode scanning with selected single decoder type.
After MWB_setScanningRect() call, all subsequent scans will be restricted
to this region. If rectangle is not set, whole image is scanned.
Also, if width or height is zero, whole image is scanned.
Parameters are interpreted as percentage of image dimensions, i.e. ranges are
0 - 100 for all parameters.

Parameters:

codeMask - Single decoder type selector (MWB_CODE_MASK_...)

rect - Rectangle containing x, y, width, height (percentages)

Returns:

MWB_RT_OK Rectangle set successfully

MWBgetScanningRect

public static RectF MWBgetScanningRect(int codeMask)

Get rectangular area for barcode scanning with selected single or multiple decoder type(s).
If codeMask is 0, union rectangle of all ACTIVE barcode types will be returned
Output values are in percentages of screen width and height (range 0 - 100)