Provided that Java knows where to find zbar.jar and zbarjni library, can someone post a brief example of Java code in order to
1) load an image (jpg, tiff or so what) somewhere in the file system
2) scan that image
3) print on stdout the result.
Many thanks,
Marco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've attached my Proof of Concept code, I'd appreciate any feedback and/or fixes to the attached code.
BSD license will let you use it whereever you want it.
I'm surprised how much code is needed for this simple task. I guess parts of the code (like image conversion) could be included in zbar library. Piotr, maybe you would like to contribute it to the project? Currently your BSD license is not compatible with zbar license. For example because you require to include your name in binaries. Is it possible you publish your code under LGPL 2.1 also? Practically that means the copy of your file with the license copied from zbar java files (with copyright line changed).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh i totally forgot about the need for binary notice, I'll update the file on the server so feel free to include the code it zbar or any other project as LGPL 2.1 :).
The amount of code could be reduced if you'd convert every image and not treat BufferedImage differently. You'd lost a few cycles though.
Another thing one would need to think about is memory utilization.. I'll be working more closely with the library and the code in the next month so hopefully I'll be able to bring some feedback when i'll have some more data or idea how to optimize it further.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Provided that Java knows where to find zbar.jar and zbarjni library, can someone post a brief example of Java code in order to
1) load an image (jpg, tiff or so what) somewhere in the file system
2) scan that image
3) print on stdout the result.
Many thanks,
Marco
Hi,
I've attached my Proof of Concept code, I'd appreciate any feedback and/or fixes to the attached code.
BSD license will let you use it whereever you want it.
http://sobie.ch/ZbarBarcodeReaderImpl.java.gz
Best regards,
Piotr Sobiech
I didn't include reading the image and printing the results, but you should be able to do this part yourself :)
I'm surprised how much code is needed for this simple task. I guess parts of the code (like image conversion) could be included in zbar library. Piotr, maybe you would like to contribute it to the project? Currently your BSD license is not compatible with zbar license. For example because you require to include your name in binaries. Is it possible you publish your code under LGPL 2.1 also? Practically that means the copy of your file with the license copied from zbar java files (with copyright line changed).
Oh i totally forgot about the need for binary notice, I'll update the file on the server so feel free to include the code it zbar or any other project as LGPL 2.1 :).
The amount of code could be reduced if you'd convert every image and not treat BufferedImage differently. You'd lost a few cycles though.
Another thing one would need to think about is memory utilization.. I'll be working more closely with the library and the code in the next month so hopefully I'll be able to bring some feedback when i'll have some more data or idea how to optimize it further.
Thank you for your example.
Piotr Sobiech, puedes postear el proyecto completo de tu implementacion
Piotr Sobiech, you can post your entire project implementation
Can you pls share your POC, i dont see it @ http://sobie.ch/ZbarBarcodeReaderImpl.java.gz