taken from sf.net/http://sourceforge.net/projects/barcode2d