FFScan
SCSI scanner single page scan

Prototype

Put the following prototype in the prototypes section of the application program header file:

void ( __stdcall *pfnFFScan )( HANDLE, void*, int, int, int, int, int, int, int );

Purpose

The purpose of this routine is to scan a page from some of the most popular SCSI2 scanners (see the specification). The page can be scanned both from the flatbed or from the automatic document feeder (ADF), and the resulting black & white image is put into a memory area.

Description and use

The function is quite easy to use. You should first allocate a memory buffer to accomodate the image of the page that will be scanned. After scanning, the image remains into the memory buffer. Don't forget to release the memory when you are finished.

Scan is performed b&w at 200 dpi (b&w means one bit per pixel). For this reason you should prepare a frame buffer in memory (using GlobalAlloc) accordingly.

If the paper sheet to scan is A4 size (210 by 297 millimeters) this would result in a 1664 by 2336 pixel image at 200 dpi. The frame buffer to allocate, in bytes, at 1 bit per pixel, would be 1664 by 2336 divided by 8.

See the given example to see it all.

For multiple page scanning from the ADF check out FFGroupScan.

Specification

You can use one of the following scanners:
  • Avision AV-810
  • Avision AV-820
  • Avision AV-830
  • Fujitsu ScanPartner 10
  • Fujitsu ScanPartner 300C
  • Fujitsu ScanPartner 600C
  • Fujitsu ScanPartner 620C
  • Bell+Howell 2000F
All these scanners are actually manufactured by Avision Corp., and some models are marketed from Fujitsu and Bell+Howell with their own name brand. These scanners are all excellent in that they are fast, reliable and cheap.

The format of the scanned image can be any size up to the maximum scanning window of the scanner, which is approximately 215 by 307 millimeters. Common formats like A4 and letter size paper sheet documents stay within this limits.

Parameters
  • application handle: the handle to the calling application program
  • image width in pixels (@ 200dpi): you can set any width, provided it doesn't exceed the width of the scanner; these are common values:
    • A4 size: 1664
    • letter size: 1728
  • image heigth in pixels (@ 200dpi): you can set any heigth, provided it doesn't exceed the heigth of the scanner; these are common values:
    • A4 size: 2336
    • letter size: 2304
  • document feeding: select one of the following values:
    • 0 scan from the flatbed
    • 1 scan from the Automatic Document Feeder
  • threeshold: the intensity of the image; any value from 0 to 255; use 128 to start with; adjust according to the clarity of the image
  • host adapter ID: usually 0
  • SCSI ID: the SCSI ID of the scanner
  • SCSI LUN: the SCSI LUN of the scanner (usually 0)

Return value

No return value.

Application examples

See also

Notes