Question

I have a number of documents scanned to png files. I do not know the orientation of each scan. I need to know how much to rotate them when I present them to the user; either 0, 90, 180 or 270 degrees. The documents are in English.

I am using MODI to extract text from each image in a .net 4.0 c# environment. Is there a way to read the orientation of the image using MODI? Or perhaps another method accessible from c# to detect the orientation of the image?

No correct solution

OTHER TIPS

Why use method? Just check the sizes:

if(img.width>img.height)
    //orientation=landscape
else
    //orientation=portait
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top