Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WIA and TWAIN image / document scanning

105 views
Skip to first unread message

Sherlock

unread,
Jun 19, 2006, 8:09:45 PM6/19/06
to
Fabrice

You TWAIN code is excellent but what is the situation with WIA
interface which has become the standard over the last few years.

How are other developers handling WIA and TWAIN ?
Are using and OCX or DLL or Fabrics stuff ?

Phil McGuinness

GSchaller

unread,
Jun 19, 2006, 8:14:52 PM6/19/06
to
Use MODI Phil.

"Sherlock" <sher...@sherlock.com.au> wrote in message
news:1150762185....@g10g2000cwb.googlegroups.com:

Sherlock

unread,
Jun 20, 2006, 7:36:00 AM6/20/06
to
snip[ Use MODI Phil. ]

What is MODI... ?
Did a quick Google search and found nothing remotely related to
programming or scanning.

Phil
---

Sherlock

unread,
Jun 20, 2006, 7:46:56 AM6/20/06
to
MODI.... found info on it..

MODI OCR (Microsoft Office Document Imaging)

I do not want to be dependant on Microsoft office and which version
they may or may not have on their machines.

Phil
-----

GSchaller

unread,
Jun 20, 2006, 8:03:52 AM6/20/06
to
Phil,

No matter what you use you will be dependent on something or someone.
The difference with MS is that it is relatively universal and covers a
wider range of scanner devices than other options. The key manufacturers
work in with MS.

Even Kodak only supported limited devices.

Don't forget that MS is also a founding member of WIA and promotes its
use. The good thing about MODI is that it has been around and the API is
in wide use. Meaning it is relatively stable.

But no one solution is going to fit all...

Geoff


"Sherlock" <sher...@sherlock.com.au> wrote in message

news:1150804016.9...@p79g2000cwp.googlegroups.com:

Sherlock

unread,
Jun 20, 2006, 9:00:21 AM6/20/06
to
Geoff,

I will be working on a VO interface to an excellent product from
www.art-copy.com and have request the SDK. They seem to have a total
solution and for around $100 US which is reasonable for the
application. At least I can some support and know these people
specialise in this end of the market.

===
scanning to a file, scanning to a printer, scanning to your favorite
email client, scanning to a fax, or even scanning to another program on
your computer. Click the button and Art-Copy will take care of the rest
making for an all around simple process
===
duplex scanning support so that users can use their standard ADF
(automatic document feeder) to perform a full duplex scanning job. What
this means is now you can scan both sides of documents with your normal
ADF scanner and have Art-Copy Business automatically sort the page
order into a multiple page PDF or Tiff file.
===
with OCR functionality built directly into the program. Art Copy
Enterprise can batch scan documents while recognizing text, which can
be exported as a rich text format or even exported directly into
Microsoft Word.
===

Phil

Karl Faller

unread,
Jun 20, 2006, 10:01:54 AM6/20/06
to
Phil,
thx for the link. Would you keep us up2date re the SDK and your
interface? Might be interesting ;-)

OTOH, when i see their sample code like:
...
//'Set File type to PDF
ACSDK.ACFileFileTypeIndex = 2
//'Set Output to File
ACSDK.ACScanTarget = 0

i'd like to take a hammer and smit s/o ;-((

Karl

tdoc...@googlemail.com

unread,
Jun 20, 2006, 10:17:17 AM6/20/06
to
Geoff at al,

Firts of all try thgis in Google: wiaEventDeviceConnected it the easy
way to find the wia stuff on MS Support.

Then here is our function (from Paolo Calzi) below ....

Any improvements or comments appreciated

There is another MS Site to visit which lists the relatively FEW
scanners that support WIA. Cannot lay my hands on it immediately....

Richard

FUNCTION WIAAcquireImage(cFileToSave, cFileType, lLowRes) // File
// cFileType "TIF" "JPG"
// lLowRes "TRUE" for low resolution
// cFileToSave string indicating file path and name where to save the
scanned image NO FILE EXTENSION
LOCAL oImgFile AS OBJECT
LOCAL oApp AS OBJECT
LOCAL oIP AS OBJECT
LOCAL oOldErr AS USUAL
LOCAL oError AS USUAL
LOCAL lOk:=FALSE AS LOGIC

Default(@cFileType, "JPG")
IF ! cFileType == "TIF" // just to be safe
cFileType == "JPG"
ENDIF

Default(@lLowRes, FALSE)
oOldErr:=ErrorBlock() // dont use tdoc error
as we wish to recover
ErrorBlock({|oError| _Break(oError)})

BEGIN SEQUENCE

oApp:=OLEAutoobject{"WIA.CommonDialog"}
oImgFile:=OLEAutoobject{"WIA.ImageFile"}

oImgFile:=oAPP:ShowAcquireImage(,,MinimizeSize,,0,,)

IF oImgFile != NULL_OBJECT
// DIM IP AS New ImageProcess
oIP:= OLEAutoobject{"Wia.ImageProcess"}
// Set IP = CreateObject( "Wia.ImageProcess" )
oIP:Filters:Add(oIP:FilterInfos:[Item,"Convert"]:FilterID,)
// "Convert"

IF cFileType == "JPG"
oIP:Filters:[Item,1]:Properties:[Item,"FormatID"]:Value:=
wiaFormatJPEG
//IP.Filters(1).Properties("Quality").Value = 5
IF lLowRes

oIP:Filters:[Item,1]:Properties:[Item,"Quality"]:Value:=50
ENDIF

ELSEIF cFileType=="TIF"
oIP:Filters:[Item,1]:Properties:[Item,"FormatID"]:Value:=
wiaFormatTIFF
ENDIF

oImgFile := oIP:Apply(oImgFile)

FErase(cFileToSave + "." + oImgFile:FileExtension)
oImgFile:SaveFile(cFileToSave + "." + oImgFile:FileExtension)
IF File(cFileToSave + "." + oImgFile:FileExtension)
lOk:=TRUE
ENDIF
ENDIF

RECOVER USING oError
WarningBox{SysObject(),"Set Up Problem","WIA problem" + CRLF +
AsString(oError:Description)}:Show()
END SEQUENCE

ErrorBlock(oOldErr)

RETURN lOk

GSchaller

unread,
Jun 20, 2006, 5:49:15 PM6/20/06
to
Thanks.

I'll compare this with our MODI lib later.

Geoff


"tdoc...@googlemail.com" <tdoc...@googlemail.com> wrote in message
news:1150813037.0...@u72g2000cwu.googlegroups.com:

GSchaller

unread,
Jun 20, 2006, 5:52:23 PM6/20/06
to
I wonder...

It would be interesting to see what the dependent dll's are.

Keep us advised please.

Geoff


"Sherlock" <sher...@sherlock.com.au> wrote in message

news:1150808421.4...@c74g2000cwc.googlegroups.com:

0 new messages