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.
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 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
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.