Is there any simple way for converting PNG to PBM?
ocrad requires PBM image, not PNG.
Check out Pillow
. According to the docs, it supports PBM, PGM, and PPM formats out of the box. The following code should get you started:
from PIL import Image
im = Image.open("myfile.png")
im.save("myfile.pbm")