Dynamic Web TWAIN: How can I acquire black-white images?

You can set the value of PixelType property to EnumDWT_PixelType.TWPT_BW.

Allowed Values PixelType
EnumDWT_PixelType.TWPT_BW (0) BW
EnumDWT_PixelType.TWPT_GRAY (1) GRAY
EnumDWT_PixelType.TWPT_RGB (2) RGB

JavaScript Sample:

function ScanImage(){
    DWObject.OpenSource();
    DWObject.IfShowUI = False;
    DWObject.IfDisableSourceAfterAcquire = True
    DWObject.PixelType = 0;
    DWObject.AcquireImage();
}

 

Is this page helpful?

Leave a Reply

Your email address will not be published.