Scanning Images using VB.net RRS feed

  • Question

  • I am interning this summer and have run into a problem.  I have had two or three programming courses while in college, one of which using VB.net.  I am in the process of writting a program that can look up and add scanned images from a database.  Problem is I don't know how to write code for scanning an image.  Does anyone have any information or suggestions?
    Friday, May 25, 2007 8:11 PM


All replies

  • You will have your work cut out if you the scanner you are using is WIA compatible




    There may be slight modifications for scanners but hopefully this will get you started.


    Friday, May 25, 2007 8:30 PM
  • WIA is good as long as no complex scanning setting is required. TWAIN works better for advanced scanning tasks like ADF.

    With Asprise C# VB.NET scanning api library SDK, you can easily scan from almost any scanners and save as JPG, PNG or PDF:

    Imports asprise_imaging_api
    Dim result As Result = New AspriseImaging().Scan(New Request()
       .SetTwainCap(TwainConstants.ICAP_PIXELTYPE, TwainConstants.TWPT_RGB)
       .SetTwainCap(TwainConstants.ICAP_SUPPORTEDSIZES, TwainConstants.TWSS_USLETTER)
       .SetPromptScanMore(True) ' prompt to scan more pages
       .AddOutputItem(New RequestOutputItem(AspriseImaging.OUTPUT_SAVE, AspriseImaging.FORMAT_JPG)
          .SetSavePath(".\${TMS}${EXT}")), ' Environment variables in path will be expanded
      "select", True, True) ' "select" prompts device selection dialog.
    Dim files As List(Of String) = If(result Is Nothing, Nothing, result.GetImageFiles())
    Console.WriteLine("Scanned: " & String.Join(", ", If(files Is Nothing, New String(-1) {}, files.ToArray())))

    Thursday, September 1, 2016 4:03 PM