black & white

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
mcnewsxp
Posts: 11
Joined: Thu Sep 06, 2007 7:27 pm

black & white

Post by mcnewsxp » Sat Nov 17, 2007 6:28 pm

how can i scan in black & white only?
tia,
mcnewsxp

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

Post by 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.

mcnewsxp
Posts: 11
Joined: Thu Sep 06, 2007 7:27 pm

Post by 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

Post by 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

Post by mcnewsxp » Sun Nov 25, 2007 7:28 pm

had to move the code to the InitScanConfig method.
works fine.
thanks much.

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

Post by 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 => https://www.gdpicture.com/references/gdt ... lType.html

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests