The Scanning Sample
This sample demonstrates how to use scanning. You can find the samples in the \samples\scanning
directory.
For instructions on running this sample, please see the instructions to Run RasterMaster samples in your IDE or to Run samples from the Command Prompt in the Overview.
Listed below are the methods used in this sample:
IMG_scan_acquire()
is a TWAIN scanning routine. It scans an image on the current installed scanner or input device and returns the standard library image handle.IMG_ scan_open_source()
must be called first.IMG_scan_acquire_feeder()
is a TWAIN scanning method that allows scanning from a scanner with an automatic document feeder.IMG_scan_feeder_close()
is a TWAIN method used to close the scanner after calls toIMG_scan_acquire_feeder()
.IMG_scan_open_source()
is a TWAIN scanning method that allows setting the desired scan or input device.IMG_scan_get_source_list()
calls the native SDK method fromScanInterface
to get a list of scanners.IMG_scan_pages()
is a TWAIN scanning routine. It scans all pages from the currently selected scanner or input device and saves to thepath\filename
specified byfilename
in the image format file type.IMG_scan_get_cap()
returns the current setting of the specified TWAIN capability.IMG_scan_set_cap()
sets the value of the specified TWAIN capability.IMG_scan_set_caps()
sets scanning parameters such as height, width, and bits per pixel for the current scanner.IMG_scan_setup()
sets the value of the specified TWAIN capability.
Have questions, corrections, or concerns about this topic? Please let us know!