Acquire images from a scanner

brentman

Member
Joined
Jan 25, 2006
Messages
5
Location
Greensburg, PA
Programming Experience
3-5
I have a program that I am working on that needs to acquire images from a scanner. I found very little info out there about getting scanned images. I found a conversion of a C# project that uses TWAIN to acquire images from a scanner. When I compile that example everything works great. I took most of the functions from that example and used them in my program and am having some trouble.

I am able to get the windows xp scanner dialog to appear and I can adjust all the scan settings and whatnot, but I cannot seem to save the image or do anything with it. The twain.transferpictures() function just provides and arraylist for accessing the images. I am unable to transfer items from that arraylist to a graphical format. The example project I am working from called a new form and set the background of the new form to the intptr that is in the arraylist. I am not very familiar with graphical programming and am pretty lost here.

I haven't had much luck using WIA for this either. I know that WIA is the newer way of doing things, but can't find much documentation on that either. Any ideas would be greatly appreciated.

Thanks,
brent
 
I did stumble across that and gave it a shot. I keep getting a Not Implemented error when using that code. It does pick up the scanner and list its manufacturer and all that jazz, just won't acquire the image. I even tried two different scanners and updated the drivers for those scanners. I don't know if they are just older scanners that aren't WIA compatible or what. I am able to use the Windows Scanners and Cameras interface to scan things manually, so I figure they might have a shot at being WIA. Who knows. (I did remember to set the DeviceType so its not just video devices)
 
Back
Top