How to get the image orientation? (FREngine11)

  • Last Post 16 September 2016
FranciskaS posted this 15 September 2016


I am currently using orientation auto detection, but we need information about the image orientation. I have tried to get the text orientation, but it is RT_NoRotation in every cases. Am I looking for this information right place or should I check it somewhere else?

Thanks and Regards, Franciska

Order By: Standard | Newest | Votes
Natalia Karaseva posted this 15 September 2016

Did you set the following parameter:

PagePreprocessingParams::CorrectOrientation into TRUE value ?

FranciskaS posted this 15 September 2016

Yap and the auto rotation function is working, but if I request the text orientation enum, I always get a same. BTW, I am using Java lib.

Natalia Karaseva posted this 15 September 2016

Sorry, for misunderstanding. I've just checked the ImageDocument::ImageRotation description in the Developer's Help.

The ImageDocument::ImageRotation property shows the changes in orientation only if you make such changes after opening or after SaveModified method. Example: if you call ImageDocument::Transform( RT Clockwise, ... ) then you will get ImageDocument::ImageRotation = RT_Clockwise value. So, ImageDocument::ImageRotation is not about source image rotation. It is about image modification which you implement with ImageDocument after opening.

In order to get the current image orientation you should call FRPage::DetectOrientation method and look in the TextOrientation::RotationType property. For more details, find FRPage::DetectOrientation method in Developer's Help.

Hope, it will help!

  • Liked by
  • FranciskaS
FranciskaS posted this 16 September 2016

Thanks finally it is working :)

Just one more comment others, who may be in a same situation as me: use the DetectOrientation method before the preprocessing. If I check the page orientation after processing it is always RT_NoRotation.