Issue 762 in tesseract-ocr: FreeBSD: Error in pixReadStreamPng: function not present

483 views
Skip to first unread message

tesser...@googlecode.com

unread,
Sep 21, 2012, 6:13:52 PM9/21/12
to tesserac...@googlegroups.com
Status: New
Owner: ----

New issue 762 by wrijnd...@gmail.com: FreeBSD: Error in pixReadStreamPng:
function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

What steps will reproduce the problem?
1. passing a PNG to tesseract, eg:

> tesseract 97.png 97

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

Expected is a successful execution and file 97.txt as output.
Instead, I get the following output:

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

Other formats (TIFF, JPG, GIF) work as expected.


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

Ran tesseract v3.01 on a FreeBSD machine.

Please provide any additional information below.

Found issue 340
(http://code.google.com/p/tesseract-ocr/issues/detail?id=340&q=function%20not%20present),
which is the same error for TIFF and followed the solution there (reinstall
leptonica and tesseract). This did not make any difference.


ldd /usr/local/bin/tesseract:

/usr/local/bin/tesseract:
libtesseract.so.3 => /usr/local/lib/libtesseract.so.3 (0x2808e000)
liblept.so.2 => /usr/local/lib/liblept.so.2 (0x283bb000)
libgif.so.5 => /usr/local/lib/libgif.so.5 (0x28537000)
libSM.so.6 => /usr/local/lib/libSM.so.6 (0x2853f000)
libICE.so.6 => /usr/local/lib/libICE.so.6 (0x28547000)
libX11.so.6 => /usr/local/lib/libX11.so.6 (0x2855e000)
libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x28677000)
libXau.so.6 => /usr/local/lib/libXau.so.6 (0x2868f000)
libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x28692000)
libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x28697000)
librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x28699000)
libtiff.so.4 => /usr/local/lib/libtiff.so.4 (0x286a2000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x2870c000)
libjbig.so.1 => /usr/local/lib/libjbig.so.1 (0x2872f000)
libjpeg.so.11 => /usr/local/lib/libjpeg.so.11 (0x2873c000)
libz.so.5 => /lib/libz.so.5 (0x28772000)
libwebp.so.2 => /usr/local/lib/libwebp.so.2 (0x2878d000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x287ba000)
libm.so.5 => /lib/libm.so.5 (0x288ae000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x288c8000)
libthr.so.3 => /lib/libthr.so.3 (0x288d3000)
libc.so.7 => /lib/libc.so.7 (0x288e8000)


Interestingly, libpng15.so is missing from this list, even though it is
present in /usr/local/lib.

tesser...@googlecode.com

unread,
Sep 22, 2012, 3:10:45 AM9/22/12
to tesserac...@googlegroups.com

Comment #1 on issue 762 by zde...@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

See http://code.google.com/p/tesseract-ocr/wiki/FAQ#Error_in_pixReadStream

Message "Error in pixReadStream" is error message from leptonica (e.g. you
do not have problem with tesseract. I guess you do not have support for png
in leptonica.

Try some example program shipped with leptonica (e.g. conversion_reg) and
in case of error please report it at leptonica project
(http://code.google.com/p/leptonica/)

tesser...@googlecode.com

unread,
Sep 25, 2012, 3:09:49 AM9/25/12
to tesserac...@googlegroups.com

Comment #2 on issue 762 by wrijnd...@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

Hi project member,

With all respect. I do have a problem with tesseract, it doesn't work
because a component which tesseract depends on doesn't work. If you have a
flat tyre, you can say 'you do not have a problem with the car' all you
want, but you still can't drive. Please consider changing your reply
to 'the problem is in leptonica' in the future.

I have already followed the instructions on the mentioned FAQ page before
submitting this issue. They did not help me.

I decided to clean up all components involved and rebuild them. After this,
tesseract did work properly. Please consider adding the text below,
describing the steps, to your FAQ.

Thank you for your time. I consider the issue resolved.

=======================

Steps for FreeBSD to rebuild png/leptonica/tesseract.


cd /usr/ports/graphics/png
make deinstall clean
make install

cd ../leptonica
make deinstall clean
make install

cd ../tesseract
make deinstall clean
make install




tesser...@googlecode.com

unread,
Sep 25, 2012, 4:54:13 AM9/25/12
to tesserac...@googlegroups.com
Updates:
Status: No-longer-an-issue

Comment #3 on issue 762 by zde...@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

From your description I guess:
1. you had some problem with installation of libpng
2. you oversaw leptonica configure message about not detected libpng

You are right - it is not leptonica problem (neither of tesseract) that
YOUR installation of png need to be fixed.

So tesseract works as expected (it did its job - OCR of SUPPORTED images
format). Leptonica works as expected (you did not compiled in png - support
you did not get support for it).

Your attitude/explanation is ridicules: if you are not able to boot
computer - it is problem of tesseract (you can not use tesseract without
computer)???



tesser...@googlecode.com

unread,
Sep 25, 2012, 6:01:52 AM9/25/12
to tesserac...@googlegroups.com

Comment #4 on issue 762 by wrijnd...@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

Please take my remark as constructive criticism on what I perceived as an
incorrect statement about my perception of the problem. This is exactly as
how it was intended.

I hope that, on reflection, you will realize that your counterexample is
off the mark. I don't feel like spelling it out.

I suggest that you be more objective to incoming remarks, be it technical
or otherwise. It was not my intention at all to have a conflict with your
ego. I just wanted to get this fixed.

tesser...@googlecode.com

unread,
Sep 25, 2012, 3:15:10 PM9/25/12
to tesserac...@googlegroups.com

Comment #5 on issue 762 by zde...@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

Your problem was "fixed" without changing a letter in tessereact-ocr (or
leptonica that is independent project same as libpng, libtiff, libz, libc
etc.). You just needed to fix your installation of libpng (and rebuild
leptonica).

tesser...@googlecode.com

unread,
Sep 25, 2012, 4:55:48 PM9/25/12
to tesserac...@googlegroups.com

Comment #6 on issue 762 by wrijnd...@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
http://code.google.com/p/tesseract-ocr/issues/detail?id=762

Yes, we can agree on that. And I'm very happy with the results because my
problem got fixed.

I have trouble visualizing what you are insinuating. Are you of the opinion
that I somehow want tesseract to be broken so that I can blame it? I urge
you to consider the notion that I want the exact opposite, namely for it to
work perfectly. Which is why I eventually landed here in the issues
section, so that someone could help me make it work. 'Making it work' is
independent of which component causes the problem, I just wanted to fix
this issue and it is fixed. So, thank you for your time.

I really feel there is some miscommunication going on here. Can we stop
this please?

tesser...@googlecode.com

unread,
Jul 31, 2015, 3:19:49 PM7/31/15
to tesserac...@googlegroups.com

Comment #7 on issue 762 by sistu....@gmail.com: FreeBSD: Error in
pixReadStreamPng: function not present
https://code.google.com/p/tesseract-ocr/issues/detail?id=762

If you are in 2015 and still facing the same issue, the same solution
works...

I just re installed the Leptonica and tesseract is working like a charm...

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages