From: Jeremias M. <de...@je...> - 2009-02-19 08:10:11
|
As far as I know, the barcode software in Android (running on the G1) is ZXING from Google. I've just written a test program to see what ZXING does with Code128 barcodes generated by Barcode4J. It can read the barcodes but it seems very intolerant. If I set the module width to be exactly one pixel [1], it reads the barcode just fine, but if there are slight variants of bar widths due to resolution or scaling effects it fails to read it. Please note: I'm talking about bitmaps generated directly by Barcode4J, not by scanning them using a camera (from a phone), which means we're talking about perfect quality (no rotation, not JPEG compression artifacts, no nothing). It gets even worse with DataMatrix, where I've never managed to scan a single symbol with ZXING. IMO, that software is not good enough for doing anything serious, yet. Just to be clear: All barcodes I created in this test scanned just fine with my hardware reader after printing them out. Barcode4J is not the problem in general. Of course, depending on your settings (module width etc.) and the way you're printing the barcodes can have a big influence on readbility. See also [2]. [1] int dpi = 72; double moduleWidth = 1.0; bean.setModuleWidth(UnitConv.in2mm(moduleWidth / dpi)); [2] http://barcode4j.sourceforge.net/troubleshooting.html On 19.02.2009 01:27:06 Ania Wieckowska wrote: > Hey, > > So I had been trying to use Barcode Scanner on my G1 to scan the codes and > because it wasn't picking them up at all I though the problem was with the > scanner.... but I've since verified that I can scan arbitrary barcodes from > other sites. I'm not changing any of the properties of the Code128Bean, but > even the simplest strings (ex, "1234") are not being picked up. > > What's going on? > --Ania > > > > ---------- Forwarded message ---------- > > > Hi, > > I'm trying out the barcode4j JavaBean API to generate Code128 barcodes which > contain pipes(|), digits & carriage returns (\r). The pipes and digits are > showing up fine, but the carriage returns is missing from the printed text > underneath the image. > I haven't verified whether the carriage return is missing from the barcode > itself, because I don't have a barcode scanner and so far have had no luck > finding a freeware or online barcode tester (most apps are linked to barcode > libraries and will not simply read back the encoded value). > So... what do I need to do to have the carriage return encoded? > > Thanks. I think this package will solve my use case perfectly. > -Ania > > > P.S. I would be very grateful if anyone can recommend an online or freeware > barcode reader for testing. Jeremias Maerki |