This is a patch to add an alternative constructor to the python zbar lib. It allows one to create a zbar.Image directly from a PIL Image object. For example, the following code:
width, height = pil_image.size
raw = pil_image.tostring()
zimage = zbar.Image(width, height, "Y800", raw)
can not be written as:
zimage = zbar.Image.fromPILImage(pil_image)
I think this is slightly nicer, so I'd like to submit the patch for inclusion. I wrote the patch against the version in Debian Squeeze, but I think that the patch should apply pretty easily to the current head in the hg. Please check it out.