1

I am using tesseract-android-tools api. I need to rotate image as a pix before calling tesseract for result. I try to use

Rotate.rotate(Pix pixs, float degrees, boolean quality) 

After saving rotated image, I can see that just the content has been rotated. See the add images. What I did is also set the Rect with correct dimensions, but no result :

rect = pix.getRect();
Pix p = Rotate.rotate(pix, 90, true);
int tempBo = rect.right;
rect.right = rect.bottom;
rect.bottom = tempBo;
api.clear();
api.setImage(p);
api.setRectangle(rect);

or creating new Pix, with correct dimensions, also no result :

Pix temp = Pix.createFromPix(pix.getData(), rect.right, rect.bottom, pix.getDepth());

Any Idea how to rotate correctly image on pix level?

Image need to be rotate

after calling Rotate.rotate(..) , rotate just content

rmtheis
  • 5,992
  • 12
  • 61
  • 78
andrej
  • 101
  • 1
  • 7

0 Answers0