Windows Image Acquisition Tools

Windows Image Acquisition (WIA) Tools

[This is preliminary documentation and subject to change.]

SUMMARY

This sample shows how to use the WIA Preview Component as well as how to use a driver's segmentation filter. The WiaPreview sample only works together with drivers that come with an image processing filter (the Windows DDK ships with one such test driver - the "Extended WIA Monster Driver Sample").

The WiaPreview sample also implements its own simple error handler, which can handle WIA_ERROR_COVER_OPEN (depending on if user wants the sample to handle it).

Using the sample:

1. Select a device which comes with an image processing filter (and preferably also

a segmentation filter) from the "Select Device" dialog.

2. Click "New Preview" to acquire a preview image from the scanner through the preview

component.

3. Use slider to adjust image brightness.

4. Click "Detect Regions" to invoke the driver's segmentation filter. For each detected

sub-region you can now individually adjust the brightness.

5. Click "Final Scan" when you are done adjusting the brightness to download all images

into "My Pictures" folder. After a "final scan" has been made you must click "New Preview"

in order to make a new scan.

Error handling:

The WiaPreview sample contains the menu item "Error Handling" that can be use to adjust

the behavior of WiaPreview's own error handler, as well as to instruct the "Extended

Monster Driver" what device messages it should send. This part is specific to the Monster

Driver and only for illustrational purposes.

Work items:

1. An image which is being de-skewed may not be shown in its correct proportions during

previewing. We always paint the image within its bounding rectangle during previewing,

which may cause the image to be somewhat streched in either the x-direction or

the y-direction.

NOTE: This sample will only work on Windows Vista and higher releases.

© 2001 Microsoft Corporation