4

I have a Leptonica Pix object returned by

TessBaseApi.getThresholdedImage();

now, how can I convert it to bitmap so that I can show it through the ImageView.

leptonica.android.Pix to android.graphics.Bitmap;

I didn't find conversion methods looking at the API files.

Dimitar
  • 4,402
  • 4
  • 31
  • 47
Aavaas
  • 787
  • 1
  • 7
  • 16

1 Answers1

9

For someone with the problem I found the way after lot of searching in the source .java files:

import com.googlecode.leptonica.android.WriteFile;

and then pass the pix object to writeBitmap.

Bitmap bitmap = WriteFile.writeBitmap(pixObject);
Aavaas
  • 787
  • 1
  • 7
  • 16