Example Integration with Imaging.NET for large doc scans

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

Moderator: Alex

Post Reply
Posts: 11
Joined: Fri Mar 19, 2010 9:21 pm

Example Integration with Imaging.NET for large doc scans

Post by smithsw » Wed Jun 23, 2010 2:11 am

Good evening,

Are there any examples / best practices for scanning large documents (>150 pages)? While acquiring, we need to display the page to the operator for a quick on-the-fly QA check. After acquiring, the scanned document needs to be opened in the Image/Thumbnail Viewer controls for final editing (page delete, page rotation, page reorder, etc.) as well as inserting/appending of additional pages from the scanner. (FYI... following one of the example projects for the Image Viewer, the Image/Thumbnail viewer is configured using the _sourceStream variable for opening of the source image file.)

I have tried <control>.images.add(New Bitmap(VSTwain1.GetImage(i-1)) in the VSTwain1.ImageAcquired event, but this crashes the application by consuming so much memory.

I am open to whatever option (in memory, disk, etc.) will render the fastest acquire time and opening time in the Image/Thumbnail viewer. Overall process speed is most important for this app.

Thank you so much for all your assistance.


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

Re: Example Integration with Imaging.NET for large doc scans

Post by Alex » Wed Jun 23, 2010 11:10 am

Hello Shane,

Here are some hints:
  • Your code is not optimal:

    Code: Select all

    control.images.add(New Bitmap(VSTwain1.GetImage(i-1)))
    Here is optimal code:

    Code: Select all

  • You should use temporary image file if you have many images, in this case ImageViewer will load into memory only focused image.
Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests