1

Getting the following error:

Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Error in pixReadStreamGif: function not present
Error in pixReadStream: gif: no pix returned
Error in pixRead: pix not read
Unsupported image type.

Any ideas why?

2 Answers 2

1

Please refer Issue 35 of Leptotica: http://code.google.com/p/leptonica/issues/detail?id=35

pixRead for gif have a potential problem related to closing file stream (fclose) that depends on OS. The problem has been fixed for windows (win32) as shown in Issue 35, but I guess the same problem still exists for OSX. I also meet the same problem when building .NET (not win32) application with Leptotica.

0

Was leptonica built without support for gif? Homebrew doesn't seem to include support for gif:

$ brew info leptonica
leptonica: stable 1.69
http://www.leptonica.org/
Depends on: libpng, jpeg, libtiff
/usr/local/Cellar/leptonica/1.69 (240 files, 7.5M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/leptonica.rb
==> Options
--with-libtiff
    Build with libtiff support
--without-jpeg
    Build without jpeg support
--without-libpng
    Build without libpng support

You could try building leptonica from source, or just convert images to some other format first:

convert file.gif temp.png; tesseract temp.png output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .