jonasfj / zbar-sharp

.Net/Mono bindings for zbar
http://jonasfj.github.io/zbar-sharp/
GNU Lesser General Public License v2.1
41 stars 25 forks source link

zbar_scan_image always returns 0 #5

Open matthysdt opened 8 years ago

matthysdt commented 8 years ago

Hi, first off, thanks for creating and sharing this project!

I'm stuck at the point where zbar_scan_image is called in the DLL. It always returns a 0. According to the documentation (see [1]), this means no symbols were found.

However, this very same image file does return symbols when I use the ZBar Console App. I copied the DLL's that I'm using from my local ZBar installation.

I've been stuck at this point for quite some time, any ideas?

Thank you!

[1] http://zbar.sourceforge.net/api/zbar_8h.html#018800e5739b5de9e241e26cfc85fdeb

jonasfj commented 8 years ago

Not really... I suspect it might be related to how the image is encoded I've seen better results with console app before...

Honestly, you might want to check out: http://zxingnet.codeplex.com/ I think it's easier to use... this code is from way back when zbar was more actively maintained and there were no .Net libraries for scanning barcodes..

matthysdt commented 8 years ago

I did manage to get my app going by firing the ZBar console app and intercepting the output, not ideal but it does the job.

Thanks for the link, I'll check it out. For some reason I was under the impression ZXing was only available as Java and I didn't like porting it.