Hello,
I sent you a reply to the email that you sent. I'm just reposting it here so others can have a look at it.
The basic concept is, you load an image using the RasterCodecs class. You add that loaded image to the RasterDocumentEngine object. Then you call the AutoOrientPage() method, specifying the page you would like to auto orient. Next, you export the oriented page to a RasterImage object. Finally, you call the Save() method in the RasterCodecs to save it to the disk.
SAMPLE CODE FOLLOWS:
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Document
Public Sub AutoOrientPageExample()
' Note that this is a sample key, which will not work in your toolkit
' Change it to the key that you were given.
RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")
' We have to start the codecs engine before creating a new instance
RasterCodecs.Startup()
' Create instance of the class.
Dim rasterCodecs as RasterCodecs = new RasterCodecs()
' Create an instance of the document engine and start the engine.
Dim rasterDocument As RasterDocumentEngine
rasterDocument = RasterDocumentEngine.Instance
rasterDocument.Startup()
' Adding a page here.
Dim tempImage as RasterImage = codecs.Load("C:\faxpage.tif")
rasterDocument.AddPage(tempImage, 0)
Try
rasterDocument.AutoOrientPage(0)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
' Export the page to a RasterImage object and save.
Dim rotatedPage as RasterImage = rasterDocument.ExportPage(0)
codecs.Save(rotatedPage, "C:\rotatedPage.tif", RasterImageFormat.TifLzw, 0)
' Shutdown the engines.
RasterCodecs.Shutdown()
rasterDocument.Shutdown()
End Sub