Reputation: 457
I am trying to convert PNG image file to text using pytesseract. It is giving me the below error.
TesseractError: (1, 'Tesseract Open Source OCR Engine v3.05.00dev with Leptonica Warning in pixReadMemPng: work-around: writing to a temp file
libpng warning: Application built with libpng-1.4.3 but running with 1.5.14 Error in pixReadStreamPng: png_ptr not made Error in pixReadMemPng: pix not read Error in pixReadMem: png: no pix returned Error during processing.')
When i do tesseract -v
tesseract 3.05.00dev
leptonica-1.72
libjpeg 9 : libpng 1.5.14 : libtiff 4.0.3 : zlib 1.2.5 : libopenjp2 2.1.0
Upvotes: 0
Views: 4971
Reputation: 1
I faced the same problem:
In my pc tesseract engine version was 3.0.
when I installed tesseract engine of version 5.0 or greater and used its path as
pytesseract.pytesseract.tesseract_cmd=r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe"
Upvotes: 0
Reputation: 1
I also meet this problem, and I can't find the answer on the internet.
But I try to download the tesseract-ocr and install it, then:
TESSDATA_PREFIX:"C:\Program Files (x86)\Tesseract-OCR\tessdata"
C:\Program Files (x86)\Tesseract-OCR
to the path variable.pytesseract.py
in Line 35, tesseract_cmd = 'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe'
When I call pytesseract.image_to_string(img)
in anaconda prompt, it return a string. My Environment:
Upvotes: 0