Twain - How to use specific capability like Threshold

Discussions about image processing and document imaging.
Post Reply
User avatar
m.cordini
Posts: 20
Joined: Mon Jun 25, 2007 11:41 am
Location: Piacenza ( Italy )
Contact:

Twain - How to use specific capability like Threshold

Post by m.cordini » Tue Jun 26, 2007 9:29 am

Hi Loic,
a little question.
in the twain specs i can set SetThreshold
but i can't found in the ogdpicture.twain.
is very important for my procedure.
can you help me :?:

User avatar
Loïc
Site Admin
Posts: 5597
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Tue Jun 26, 2007 10:47 am

Hi Marco.

Good question! As always. :D


You can use the low level API to do that:

Code: Select all

Dim nCapItemType As Long
Dim nTresholdValue As Long



nCapItemType = oGdPicture.TwainGetCapItemType(ICAP_THRESHOLD)
nTresholdValue = 150 ' [0 to 255] from the TWAIN 1.9a Specification (9-491)

Call oGdPicture.TwainSetCapCurrentNumeric(ICAP_THRESHOLD, nCapItemType, nTresholdValue)

Best regards,

Loïc

User avatar
m.cordini
Posts: 20
Joined: Mon Jun 25, 2007 11:41 am
Location: Piacenza ( Italy )
Contact:

Post by m.cordini » Tue Jun 26, 2007 11:56 am

Loïc wrote:Hi Marco.

Good question! As always. :D


You can use the low level API to do that:

Code: Select all

Dim nCapItemType As Long
Dim nTresholdValue As Long



nCapItemType = oGdPicture.TwainGetCapItemType(ICAP_THRESHOLD)
nTresholdValue = 150 ' [0 to 255] from the TWAIN 1.9a Specification (9-491)

Call oGdPicture.TwainSetCapCurrentNumeric(ICAP_THRESHOLD, nCapItemType, nTresholdValue)

Best regards,

Loïc
and as usual your answers are always Most useful...
thanks a lot...

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests