看到一個有趣的東西可以解析條碼的工具庫
ZXING
測試了一下
Java代碼
import java
import java
import java
import java
import java
import com
import com
import com
import com
import com
import com
public class CodeReader {
/**
* @param args
* @throws ReaderException
* @throws InterruptedException
*/
public static void main(String[] args) throws ReaderException
Reader reader = new MultiFormatReader();
String imgPath =
Image image=java
BufferedImage myImage = CodeReader
MonochromeBitmapSource source = new BufferedImageMonochromeBitmapSource(myImage);
Result result = reader
System
}
public static BufferedImage imageToBufImage(Image image) throws InterruptedException{
MediaTracker mt=new MediaTracker(new Frame());
mt
mt
BufferedImage bufImage=new BufferedImage(image
Graphics
g
return bufImage;
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26474.html