Hello there, I've come across to perform some orientation based task on my input image/pdf. I found source code in flexicapture sdk "Image processing" and the procedure of different image processing operation. I'm trying to perform orientation based operation, below is my source code to perform task.
in the above source code, i got some confusion at the line "**I got stuck at here****"
when i applied RotateImageByRotationType method, this method return me a page which is the result page denoted by "_page" in above code
1. does after performing RotateImageByRotationType method, the original page in imagefile gets change or stayed same as before?
Pls reply fast !!!
asked 01 May '14, 14:23
When you call ImageProcessingTools::DetectOrientationByText method you get current page rotation as a result. After it you can rotate the image using ImageProcessingTools:: RotateImageByRotationType method. It’s necessary to specify needed rotation correctly. For example, if the result of ImageProcessingTools::DetectOrientationByText is RotationTypeEnum. RT_Clockwise then you should pass RotationTypeEnum.RT_Counterclockwise as a rotation type parameter to ImageProcessingTools:: RotateImageByRotationType method.
C# code might look like the following:
If you want to save the rotated image, you could use Image::WriteToFile method.
answered 06 May '14, 12:29
Dear, Thank you for you recommendation. As par as above solution, it seems it does not rotate original image rather it give u rotated one as _page in above code, OK. But as par as your tutorial's say's, we can use the resultant image further with flexicapture processor.
for example, [as par as tutorial] Preprocess the image using methods of the ImageProcessingTools object. **i perform rotation of page in image of pdf, i got result as _page of a image of a pdf: Repeat for every page of image of pdf. Then how i ensure that i have the result pdf to load in flexicapture as step 2
Create an instance of FlexiCapture processor using the CreateFlexiCaptureProcessor method of the Engine object. . How i perform the step 2 ? Since i got a _page of image of pdf, how i use it further ?
Please share code snippet.
answered 06 May '14, 13:14
Thank you team, I got the way to perform my required task. i would like to make you in notice that, the above code written by you :
Having some issues, i have a pdf which is rotated clockwise, when i get RotationTypeEnum rotationTypeEnum the value i got is counterclockwise instead clockwise ( don't know why? i would like to know) and vice versa
so i've just changed the code like below
As par as my understanding, rotationTypeEnum gives you what rotation u need to perform in order to fix the image rather the opposite one.
Thank you for your suggestions