Question regarding rotating in memory and saving

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Moderator: Alex

Post Reply
cpav
Posts: 1
Joined: Wed Aug 06, 2008 1:09 pm

Question regarding rotating in memory and saving

Post by cpav » Fri Mar 06, 2009 2:58 pm

Dear sirs,

We use vintasoft .net twain(ver. 4.3.0.5) for scanning within a VB 2005 .NET application. As we scan 1 or more pages, the scanned pages are being saved as a multipage tiff file. After this we go and rotate for example 1st page right. We see the page that rotates right on the form, but the page on the saved file is not rotated, is as it was.
If we save the rotated page(1st page for example), a new page is being added on the end of the file.
Can you please tell us which code we have to write, so when we rotate right/left /flip the page on the form, also this rotation to be saved on the file at correct page position?

Here is how we save pages while scanning:
In image_Acquired event
VsTwain1.TiffCompression = Vintasoft.Twain.TiffCompression.CCITGroup3
VsTwain1.SaveImage(imageNum, publicCurrentScanFilename)

Here is how we rotate the page:
VsTwain1.RotateImage(imageNum, -90, Vintasoft.Twain.BorderColor.AutoDetect)

PS: We have send you a similar question about this issue 1 week ago and more. Is support getting emails? Or support did not got it?

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: Question regarding rotating in memory and saving

Post by Alex » Fri Mar 06, 2009 9:06 pm

Hello,

As I can see from your code - you are saving images to multipage TIFF file and want to process them after they were saved. VintaSoftTwain.NET Library allows to add images to multipage TIFF files but does not allow to get them from multipage TIFF file. Please use VintaSoftImaging.NET Library if you need full access to multipage TIFF file.

You should process (rotate) the image (if this is possible) and only then save it to multipage TIFF file. Here is possible code:

Code: Select all

' In image_Acquired event
VsTwain1.RotateImage(imageNum, -90, Vintasoft.Twain.BorderColor.AutoDetect)
VsTwain1.TiffCompression = Vintasoft.Twain.TiffCompression.CCITGroup3
VsTwain1.SaveImage(imageNum, publicCurrentScanFilename)
Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests