Click here to Skip to main content
15,938,218 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
class imagetotext1 {

    public static void main(String[] args) throws Exception
            BarcodeEAN codeEAN = new BarcodeEAN();
            Image image = codeEAN.createAwtImage(, Color.white);
            BufferedImage File("D:\\testing\\p99.png"));
            Graphics offg = bffImg1.createGraphics();
            offg.drawImage(image,0,170, null);
            ImageIO.write(bffImg1, "jpeg", new File("test.jpg"));

in above code i can create bar code .
what can i do for reading bar code??
Updated 15-Oct-13 3:48am
Richard MacCutchan 15-Oct-13 9:49am    
You will need a barcode reader attached to your system.
Sergey Alexandrovich Kryukov 15-Oct-13 11:25am    
It's pointless to brink here some codes written by who-knows-who, not yours. You can download any kind of trash on the Web, why should we look at it? Write your own code, explain its purpose and problems you faced with, then we will gladly help you.
baliram bhande 16-Oct-13 1:47am    
sorry sir............

1 solution

It all depends on the library where you get your code from:

Here below is from Maven:

Similar to your code above, it has "setCode()" API (see the left frame windows and click on it) to allow you to input the numbers to be converted to images.

And it also has "getCode()" which allow you to do vice versa.

Look up your library API for details.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900