Loading...

black & white

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

black & white

Postby mcnewsxp » Sat Nov 17, 2007 6:28 pm

how can i scan in black & white only?
tia,
mcnewsxp
mcnewsxp
 
Posts: 11
Joined: Thu Sep 06, 2007 7:27 pm

Postby Loïc » Mon Nov 19, 2007 4:04 pm

You can do that using the TwainSetCurrentPixelType() & TwainSetCurrentBitDepth() methods:


Code: Select all
oTwain.TwainSetCurrentPixelType (TWPT_BW)
oTwain.TwainSetCurrentBitDepth (1)



Regards,

Loïc
Last edited by Loïc on Sun Nov 25, 2007 7:19 pm, edited 1 time in total.
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby mcnewsxp » Sun Nov 25, 2007 7:17 pm

i get a TWPT_BW is not defined from vb.net
is there a numeric value?
mcnewsxp
 
Posts: 11
Joined: Thu Sep 06, 2007 7:27 pm

Postby mcnewsxp » Sun Nov 25, 2007 7:24 pm

i tried:
Axtwain1.TwainSetCurrentResolution(200)
Axtwain1.TwainSetCurrentPixelType(Gdtwain.TwainPixelType.TWPT_BW)
Axtwain1.TwainSetCurrentBitDepth(1)

but my image still scanned color.
mcnewsxp
 
Posts: 11
Joined: Thu Sep 06, 2007 7:27 pm

Postby mcnewsxp » Sun Nov 25, 2007 7:28 pm

had to move the code to the InitScanConfig method.
works fine.
thanks much.
mcnewsxp
 
Posts: 11
Joined: Thu Sep 06, 2007 7:27 pm

Postby Loïc » Tue Nov 27, 2007 3:42 pm

You are welcome!



Loïc



PS:

get a TWPT_BW is not defined from vb.net
is there a numeric value?


yes => http://www.gdpicture.com/references/gdt ... lType.html
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest