Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to read datamatrix from image file using java

How to read datamatrix from image file using java 4 years 2 months ago #3904

To decode datamatrix from image file using java language, you need to download datamatrix decoder SDK fo J2SE and inmport it into your project first.

some sample code here:

import com.aipsys.datamatrix.decoder.*;


public class dmjavamesample
{
public dmjavamesample()
{

}
public static void main(String[] args) throws Exception
{
try
{
long t2 = System.currentTimeMillis();
Scanner reader = new Scanner();
Result barcodes = reader.DecodeFromImageFile("c:\\t.jpg");
long t3 = System.currentTimeMillis();
System.out.println("time = " + (t3-t2));
if (barcodes==null)
{
System.out.println("*** NO BARCODE FOUND ***");
}
System.out.println(barcodes.toString());
}
catch (RuntimeException e)
{
System.out.println(e.getMessage());
}
}
}
The topic has been locked.

  • Posts:59
  • developer's Avatar
  • developer
  • Moderator
  • OFFLINE
  • Karma: 1
  • Page:
  • 1
Time to create page: 0.157 seconds
Powered by Kunena Forum :: Wibi