public void parse(Image image, ContentHandler handler, Metadata metadata, ParseContext context)
            throws IOException, SAXException, TikaException {
        try (TemporaryResources tmp = new TemporaryResources()) {
            int w = image.getWidth(null);
            int h = image.getHeight(null);
            BufferedImage bImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
            File file = tmp.createTemporaryFile();
            try (OutputStream fos = new FileOutputStream(file)) {
                ImageIO.write(bImage, "png", fos);
            }
            try (TikaInputStream tis = TikaInputStream.get(file.toPath())) {
                parse(tis, handler, metadata, context);
            }
        }
    }
TesseractOCRParser powered by tesseract-ocr engine. To enable this parser,
create a {@link TesseractOCRConfig} object and pass it through a
ParseContext. Tesseract-ocr must be installed and on system path or the path
to its root folder must be provided:
<p>
TesseractOCRConfig config = new TesseractOCRConfig();<br>
//Needed if tesseract is not on system path<br>
config.setTesseractPath(tesseractFolder);<br>
parseContext.set(TesseractOCRConfig.class, config);<br>
</p>
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-ocr-module/src/main/java/org/apache/tika/parser/ocr/TesseractOCRParser.java