This project has moved. For the latest updates, please go here.

Is there a way to set the BitDepth of the pages being scanned?

Mar 19, 2014 at 9:51 AM
Edited Mar 19, 2014 at 10:31 AM
I see you can set the PixelType but is there a way to set the BitDepth?

for example, when using non-twain scanning we would make a call something like this:

// for b&w
scanComponent..PixelType = PixelType_BW;
scanComponent.BitDepth = 1;

// for greyscale
scanComponent..PixelType = PixelType_GRAY;
scanComponent.BitDepth = 8;

// for color
scanComponent..PixelType = PixelType_RGB;
scanComponent.BitDepth = 24;

Any help appreciated.
Mar 19, 2014 at 10:33 AM
Ah looks like you can set it via SetCap(TwCap.BitDepth, 0); etc.
Coordinator
Mar 19, 2014 at 4:56 PM
Hello, Gleedo.
Try follow code
                if((this._twain32.IsCapSupported(TwCap.BitDepth)&TwQC.Set)!=0) {
                    this._twain32.SetCap(TwCap.BitDepth,(ushort)8);
                }
Marked as answer by SARAFF on 6/23/2014 at 12:35 PM