Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
Decode
Method | Description |
---|---|
StartFrameDecoding |
Starts a new thread to decode barcodes from the inner frame queue. |
StartFrameDecodingEx |
Starts a new thread to decode barcodes from the inner frame queue. |
AppendFrame |
Appends a frame image buffer to the inner frame queue. |
StopFrameDecoding |
Stops the frame decoding thread created by StartFrameDecoding. |
Parameter
Method | Description |
---|---|
InitFrameDecodingParameters |
Initializes frame decoding parameters. |
Callback
Method | Description |
---|---|
SetErrorCallback |
Set callback function to process errors generated during frame decoding. |
SetTextResultCallback |
Set callback function to process text results generated during frame decoding. |
SetIntermediateResultCallback |
Set callback function to process intermediate results generated during frame decoding. |
Status retrieval
Method | Description |
---|---|
GetLengthOfFrameQueue |
Gets length of current inner frame queue. |
Starts a new thread to decode barcodes from the inner frame queue.
EnumErrorCode Dynamsoft.Barcode.BarcodeReader.StartFrameDecoding(int maxQueueLength, int maxResultQueueLength, int width, int height, int stride, EnumImagePixelFormat imagePixelFormat, string templateName)
[in] maxQueueLength
<int> : The max count of frames waiting for decoding.
[in] maxResultQueueLength
<int> : The max count of frames whose results (text result/localization result) will be kept for further reference.
[in] width
<int> : The width of the frame image in pixels.
[in] height
<int> : The height of the frame image in pixels.
[in] stride
<int> : The stride of the frame image (also called scan width).
[in] imagPixelFormat
<EnumImagePixelFormat> : The image pixel format used in the image byte array.
[in] templateName
<string> : The template name.
Returns error code.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
EnumErrorCode error = reader.StartFrameDecoding(2, 10, 1024, 720, 720, EnumImagePixelFormat.IPF_BINARY, "");
reader.Dispose();
Starts a new thread to decode barcodes from the inner frame queue.
EnumErrorCode Dynamsoft.Barcode.BarcodeReader.StartFrameDecodingEx(ref FrameDecodingParameters parameters, string templateName)
[in] parameters
<FrameDecodingParameters> : The frame decoding parameters.
[in] templateName
<string> : The template name.
Returns error code.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
FrameDecodingParameters parameters = reader.InitFrameDecodingParameters();
parameters.MaxQueueLength = 3;
parameters.MaxResultQueueLength = 10;
parameters.Width = 20;
parameters.Height = 30;
parameters.Stride = 10;
parameters.ImagePixelFormat = EnumImagePixelFormat.IPF_GRAYSCALED;
parameters.Region.RegionMeasuredByPercentage = 1;
parameters.Region.RegionTop = 0;
parameters.Region.RegionBottom = 100;
parameters.Region.RegionLeft = 0;
parameters.Region.RegionRight = 100;
parameters.Threshold = 0.1;
parameters.FPS = 0;
EnumErrorCode error = reader.StartFrameDecodingEx(ref parameters, "");
reader.Dispose();
Append a frame image buffer to the inner frame queue.
int Dynamsoft.Barcode.BarcodeReader.AppendFrame(IntPtr pBufferBytes)
[in] pBufferBytes
<IntPtr> : The array of bytes which contain the image data.
Returns the ID of the appended frame.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
int ret = reader.AppendFrame(pBufferBytes);
reader.Dispose();
Stop the frame decoding thread created by StartFrameDecoding
or StartFrameDecodingEx
.
EnumErrorCode Dynamsoft.Barcode.BarcodeReader.StopFrameDecoding()
Returns error code.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
EnumErrorCode err = reader.StopFrameDecoding();
reader.Dispose();
Initialize frame decoding parameters with default values.
FrameDecodingParameters Dynamsoft.Barcode.BarcodeReader.InitFrameDecodingParameters()
Returns the frame decoding parameters.
Sets call back function to process errors generated during frame decoding.
EnumErrorCode Dynamsoft.Barcode.BarcodeReader.SetErrorCallback(CB_Error callbackFunction, IntPtr pUser)
[in] callbackFunction
<CB_Error> : Call back function.
[in] pUser
<IntPtr> : Customized arguments passed to your function.
Returns error code.
BarcodeReaderException
The exception thrown by Dynamsoft Barcode Reader.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
reader.SetErrorCallback(ErrorFunction, NULL);
EnumErrorCode error = reader.StartFrameDecoding(2, 10, 1024, 720, 720, IPF_BINARY, "");
reader.Dispose();
Sets call back function to process intermediate results generated during frame decoding.
EnumErrorCode Dynamsoft.Barcode.BarcodeReader.SetIntermediateResultCallback(CB_IntermediateResult callbackFunction, IntPtr pUser)
[in] callbackFunction
<CB_IntermediateResult> : Call back function.
[in] pUser
<IntPtr> : Customized arguments passed to your function.
Returns error code.
BarcodeReaderException
The exception thrown by Dynamsoft Barcode Reader.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
PublicRuntimeSettings settings = new PublicRuntimeSettings();
settings = reader.GetRuntimeSettings();
settings.IntermediateResultTypes = (int)(EnumIntermediateResultType.IRT_ORIGINAL_IMAGE | EnumIntermediateResultType.IRT_COLOUR_CLUSTERED_IMAGE | EnumIntermediateResultType.IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE);
reader.UpdateRuntimeSettings(settings);
reader.SetIntermediateResultCallback(IntermediateResultFunction, NULL);
EnumErrorCode error = reader.StartFrameDecoding(2, 10, 1024, 720, 720, IPF_BINARY, "");
reader.Dispose();
Sets call back function to process errors generated during frame decoding.
EnumErrorCode Dynamsoft.Barcode.BarcodeReader.SetTextResultCallback(CB_TextResult callbackFunction, IntPtr pUser)
[in] callbackFunction
<CB_TextResult> : Call back function.
[in] pUser
<IntPtr> : Customized arguments passed to your function.
Returns error code.
BarcodeReaderException
The exception thrown by Dynamsoft Barcode Reader.
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
reader.SetTextResultCallback(TextResultFunction, NULL);
EnumErrorCode error = reader.StartFrameDecoding(2, 10, 1024, 720, 720, IPF_BINARY, "");
reader.Dispose();
Get current length of the inner frame queue.
int Dynamsoft.Barcode.BarcodeReader.GetLengthOfFrameQueue()
Returns the length of the inner frame queue.
version 7.6.0