Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
| Method | Description |
|———————-|————-|
| decodeFile
| Decode barcodes from a specified image file. |
| decodeFileInMemory
| Decode barcodes from an image file in memory. |
| decodeBuffer
| Decode barcodes from raw buffer. |
| decodeBase64String
| Decode barcodes from a base64 encoded string. |
| decodeBufferedImage
| Decodes barcode from a buffered imag (bitmap). |
—
Decode barcodes from a specified image file.
TextResult[] com.dynamsoft.barcode.BarcodeReader.decodeFile(String fileFullPath, String templateName) throws BarcodeReaderException
fileFullPath
A string defining the file path.
templateName
The template name.
All barcode text results decoded successfully.
BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
TextResult[] result = reader.decodeFile("your file path", "");
reader.destroy();
Decode barcodes from an image file in memory.
TextResult[] com.dynamsoft.barcode.BarcodeReader.decodeFileInMemory(byte[] fileBytes, String templateName) throws BarcodeReaderException
fileBytes
The image file bytes in memory.
templateName
The template name.
All barcode text results decoded successfully.
BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
byte[] bufferBytes = null;
GetBufferFromFile("your file path", bufferBytes);
TextResult[] result = reader.decodeFileInMemory(bufferBytes, "");
reader.destroy();
TextResult[] com.dynamsoft.barcode.BarcodeReader.decodeFileInMemory(InputStream fileStream, String templateName) throws BarcodeReaderException, IOException
fileStream
The image file bytes in memory.
templateName
The template name.
All barcode text results decoded successfully.
BarcodeReaderException
, IOException
BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
FileInputStream fis = new FileInputStream("your file path");
TextResult[] result = reader.decodeFileInMemory(fis, "");
reader.destroy();
Decode barcodes from the memory buffer containing image pixels in defined format.
TextResult[] com.dynamsoft.barcode.BarcodeReader.decodeBuffer(byte[] buffer, int width, int height, int stride, int enumImagePixelFormat, String templateName) throws BarcodeReaderException
buffer
The array of bytes which contain the image data.
Width
The width of the image in pixels.
Height
The height of the image in pixels.
Stride
The stride (or scan width) of the image.
format
The image pixel format used in the image byte array.
templateName
The template name.
All barcode text results decoded successfully.
BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
byte[] bufferBytes;
int iWidth = 0;
int iHeight = 0;
int iStride = 0;
int format;
GetBufferFromFile("your file path", bufferBytes, iWidth, iHeight, iStride, format);
TextResult[] result = reader.decodeBuffer(bufferBytes, iWidth, iHeight, iStride, format, "");
reader.destroy();
Decode barcode from an image file encoded as a base64 string.
TextResult[] com.dynamsoft.barcode.BarcodeReader.decodeBase64String(String base64, String templateName) throws BarcodeReaderException
base64
A base64 encoded string that represents an image.
templateName
The template name.
All barcode text results decoded successfully.
BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
TextResult[] result = reader.decodeBase64String("file in base64 string", "");
reader.destroy();
Decodes barcode from a buffered imag (bitmap).
TextResult[] com.dynamsoft.barcode.BarcodeReader.decodeBufferedImage(BufferedImage image, String templateName) throws IOException, BarcodeReaderException
image
The image to be decoded.
templateName
The template name.
All barcode text results decoded successfully.
BarcodeReaderException
, IOException
BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
BufferedImage input = ImageIO.read("your file path");
TextResult[] result = reader.decodeBufferedImage(bitmap, "");
reader.destroy();
version 7.6.0