VintaSoft Twain .NET SDK Discussions

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

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Example Integration with Imaging.NET for large doc scans



Example Integration with Imaging.NET for large doc scans

Post by smithsw »

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.

Shane


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

Post by Alex »

Hello Shane,

Here are some hints:
  • Your code is not optimal:
    control.images.add(New Bitmap(VSTwain1.GetImage(i-1)))
    Here is optimal code:
    control.images.add(VSTwain1.GetImage(i-1))
  • 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


Page 1 from 1: 1