docs: @Override
      public String doOCR(int xsize, int ysize, ByteBuffer buf, String filename, Rectangle rect, int bpp) throws TesseractException {
          init();
          setTessVariables();
  
          try {
              setImage(xsize, ysize, buf, rect, bpp);
              return getOCRText(filename, 1);
          } catch (Exception e) {
              logger.error(e.getMessage(), e);
              throw new TesseractException(e);
          } finally {
              dispose();
          }
      }