fix tesseract problem -- have to be gray image, but padding is still annoying