Hi,
Warning in pixReadMemPng: work-around: writing to a temp file
Error in pixReadMemPng: tmpfile stream not opened
Error in pixReadMem: png: no pix returned
Error during processing.
I have installed the Tesseract OCR on the local machine, and test it out using Terminal, and it works perfectly. I could see the out.txt being created in the same folder as the image being rendered.
However, when I try to OCR the image via php in browser, it will not work, and throw the error stated above.
I am not sure what am I missing here?
If you can share me some light on this, it will be very helpful.
The below is the steps that I did:
1) Installed TesseractOCR on OSX using MacPort
$ tesseract -v
tesseract 3.04.00
leptonica-1.73
libgif 4.2.3 : libjpeg 9a : libpng 1.6.23 : libtiff 4.0.6 : zlib 1.2.8 : libwebp 0.5.0 : libopenjp2 2.1.0
2) Run and install Composer dependancy as the instruction and then add the following code into index.php
require_once __dir__ . '/vendor/autoload.php';
echo (new TesseractOCR('text.png'))
->executable('/opt/local/bin/tesseract')
->run();
Thanks
Regards,
Mike