jacklicn / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

Not able to run tiff files on tesseract #99

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Following are the steps i used for installing tesseract
1) brew install libpng, libtiff, libjpeg
2) brew install leptonica
3) brew install tesseract

What is the expected output? What do you see instead?

Not able run tiff on tesseract. Following is the error.
Although i am able to run png on tesseract.

tesseract Scan.tiff sample
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Error in findTiffCompression: function not present
Error in pixReadStreamTiff: function not present
Error in pixReadStream: tiff: no pix returned
Error in pixRead: pix not read
Unsupported image type.

What version of the product are you using? On what operating system?
OS X 10.9.2

Please provide any additional information below.
i don't find libtiff although i have libtiff on mac.
o/p of tesseract -v
tesseract 3.02.02
 leptonica-1.71
  libjpeg 8d : libpng 1.6.12 : zlib 1.2.5

Original issue reported on code.google.com by nageshre...@gmail.com on 17 Jul 2014 at 10:34

GoogleCodeExporter commented 9 years ago
Your program is linking as if the tiff library is not available.

If you ran configure to generate config_auto.h, and if your tiff library is 
installed, config_auto.h should have a line that says:

#define HAVE_LIBTIFF  1

If it is 0, that would cause linking of stubs for tiff calls, as your output 
demonstrates.

Look at the file configure.ac.  It checks for libtiff in lines 66ff, by looking 
for the function TIFFOpen().

If your tiff library is installed, perhaps it is not on your LD_LIBRARY_PATH, 
which could cause it not to be found.  

To find your library:

   locate libtiff

On my linux box it is in:

  /usr/lib/i386-linux-gnu/

Your linker should use such /usr/lib/...  paths by default, without you having 
to explicitly name them in LD_LIBRARY_PATH.  However, if it is in 
/usr/local/lib/..., you may need to have that directory on the path.

Let me know what you find out.

Original comment by dan.bloo...@gmail.com on 18 Jul 2014 at 11:08