Windows Image Acquisition (WIA) 2.0 is a great feature added in contemporary versions of Windows. It was an enhancement over the older WIA 1.0 that shipped with XP and Win2K.
Because it is so new, it isn't documented in the MSDN Library CDs that came with VB6. The best source of documentation is a recent Windows SDK, such as:
While WIA can be an easy way to do many types of image capture and processing in VB6 programs, the attached demo just shows a few of them:
Selecting a scanner.
Scanning a document.
Scaling an image.
Converting an image's format.
Displaying a WIA ImageFile object's contents.
Saving a WIA ImageFile object's contents to disk.
Here we select a scanner, then we scan and scale/convert to JPEG, display the result, and optionally save the image to disk.
There is also a menu in the demo that can be used to display/report various attributes of the selected scanner. The information can be useful to a developer though you wouldn't normally fetch it in a real application. However the logic used to fetch and report it may help reveal more about how some WIA objects work, so it is worth looking at.
Similar reports can be created that extract things like Filter documentation from WIA objects.
Note:
Many older scanners do not come with a WIA driver, and only support the TWAIN API. These older scanners can't be used via WIA. Even some newer scanners don't expose full functionality via their WIA drivers, and may limit resolution and other properties.
Last edited by dilettante; Mar 28th, 2013 at 10:12 AM.