Dynamic Web TWAIN: How can I scan an inverted image?

You can use Dynamic Web TWAIN's PixelFlavor property to set the pixel flavor for scanning image.

Value Pixel flavor
0 Chocolate. Zero pixel represents darkest shade
1 Vanilla. Zero pixel represents lightest shade

Code (Javascript):

function scanImage() {
    var DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
    if (DWObject) {
        DWObject.SelectSource();
        DWObject.OpenSource();
        DWObject.PixelFlavor = 0; 
        DWObject.AcquireImage();
    }
}