[Lazarus] Almost... ;) working WIA scanning code
Michael Van Canneyt
michael at freepascal.org
Tue Apr 15 14:36:36 CEST 2014
On Tue, 15 Apr 2014, Reinier Olislagers wrote:
> Hi list,
>
> Using the activex importer, I've imported the WIA wiaaut.dll on my
> Windows 7 system and mostly got WIA scanning (using a flatbed scanner in
> my case) to work. Thanks to Marco for helping me get this far.
> The code selects the first scanner, scans while showing the progress
> dialog and saves the result as a file.
>
> What doesn't work:
> Scanning the entire surface; only part of the image is scanned right
> now. Fairly essential requirement I'd say ;)
>
> Setting the driver to black and white works, but I can't seem to request
> both black and white and maximum quality:
> InVar:=wiaCurrentIntent; //what type of image we want to sacn
> //todo: this won't work gives invalid parameter!!
> //InVar2:=(WIA_INTENT_IMAGE_TYPE_TEXT or
> WIA_INTENT_MAXIMIZE_QUALITY); // black & white; good quality for given
> resolution
> InVar2:=WIA_INTENT_IMAGE_TYPE_TEXT;
> SetScannerProperty(Invar,Invar2);
>
> Source code:
> https://bitbucket.org/reiniero/papertiger/src
> wiademo.lpr and associated units
> Demo project source also downloadable via the download page.
>
> Anyway, suggestions, critique etc welcome as always,
I'm guessing this will not work on Linux, right ? ;-)
Michael.
More information about the Lazarus
mailing list