There is no need to draw an image for tesseract.

Instead it's possible just to get raw data from the input image.
Such way is better, cause in the case of the grayscale input image, there is no need to draw it in RGB color space, increasing memory consumptions significantly.