Page 1 of 1

Example Integration with Imaging.NET for large doc scans

Posted: Wed Jun 23, 2010 2:11 am
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

Posted: Wed Jun 23, 2010 11:10 am
by Alex
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

    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