AlejandroAreta / tesseract-android-tools

Automatically exported from code.google.com/p/tesseract-android-tools
1 stars 0 forks source link

Error: Bitmap functions not available; library must be compiled under android-8 NDK #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Follow the steps exactly as mentioned in the readme of 
tesseract-android-tools
2. Call baseAPI.init() with the correct datapath, language
3. Call baseAPI.setImage(bitmap)
4. Call baseAPI.getUTF8Text()

What is the expected output? What do you see instead?
Expected to see no error
Instead see the error: "Bitmap functions not available; library must be 
compiled under android-8 NDK" on step 3 and a NPE on step 4 (which is due to 
the error on step 3)

What version of the product are you using? On what operating system?
tesseract-android-tools-1.00
tesseract 3.00
Compiled on Mac OS X for Android 2.2

Please provide any additional information below.
Looks like ndk-build doesn't compile the jni source against the libjnigraphics. 
Hence, libtess doesn't seem to have native bitmap support. I'd very much like 
to know the right steps to build the libs so that this issue can be mitigated.

Original issue reported on code.google.com by tmanand@gmail.com on 21 Sep 2011 at 7:02

GoogleCodeExporter commented 8 years ago
I was missing the libjpeg.so
Don't download tesseract-android-tools, but instead get the sources from the 
repo: svn checkout http://tesseract-android-tools.googlecode.com/svn/trunk/

As kernel.org is down due to the recent attack, use the mirror to download 
libjpeg. Replace the command "git clone 
git://android.git.kernel.org/platform/external/jpeg.git libjpeg" mentioned in 
tesseract-android-tools readme, with "git clone 
git://github.com/android/platform_external_jpeg.git libjpeg".

and follow the steps here: 
http://rmtheis.wordpress.com/2011/08/06/using-tesseract-tools-for-android-to-cre
ate-a-basic-ocr-app/

Original comment by tmanand@gmail.com on 21 Sep 2011 at 10:25

GoogleCodeExporter commented 8 years ago
Removed libjpeg and support for APIs < 8.

Original comment by alanv@google.com on 11 Sep 2012 at 8:06