Multipage Tiff and AutoDeskew

Discussions about image processing and document imaging.
Post Reply
rbgolfin
Posts: 16
Joined: Wed Jun 03, 2009 3:10 pm

Multipage Tiff and AutoDeskew

Post by rbgolfin » Fri Oct 23, 2009 8:00 pm

I am loading a Multipage Tiff into the viewer as follows:

oGdPictureImaging = new GdPictureImaging();
intImageID = oGdPictureImaging.TiffCreateMultiPageFromFile(strFileWithPath); //Load the document
oGdPictureImaging.AutoDeskew(intImageID);
GdViewer1.DisplayFromGdPictureImage(intImageID);

It appears that the AutoDeskew has only affected the first page. Shouldn't it Deskew all the pages?

steves
Posts: 59
Joined: Fri Oct 17, 2008 4:38 pm

Re: Multipage Tiff and AutoDeskew

Post by steves » Mon Oct 26, 2009 10:12 am

Hi

I think first you may need to open the file for write mode first

Code: Select all

oGdPictureImaging.TiffOpenMultiPageForWrite(True)
Then i think you need to go through each page in the tiff and deskew that way

Code: Select all

For iPages As Integer = 1 To image.TiffGetPageCount(intImageID)
   oGdPictureImaging.TiffSelectPage(intImageID, iPages)   
   oGdPictureImaging.AutoDeskew(intImageID)
next
GdViewer1.DisplayFromGdPictureImage(intImageID);
This is the way i would do it.
Loic may have a better solution to this.

Cheers
Steve

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Multipage Tiff and AutoDeskew

Post by Loïc » Mon Oct 26, 2009 10:32 am

The solution is perfect !

Thanks a lot Steve.

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest