Seems to me it would be possible to use the GD image functions to read an image file, then basically read a row (or column) of pixels, establishing the position and width of each bar in the image, probably using [man]imagecolorat/man in a for loop. However, I do not know the barcode protocol(s), so i don't have any real feel as to how you convert that data into the numbers/letters represented by that pattern of bars.