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

Scann colorful not black-and-white

Aug 18, 2014 at 1:06 PM
Hi! I'm trying to scan a image withi colors, but by default the Twain is scanning black-and-white.
I've tried to set many capcabilites, but nothing works.
Now my code is the folowing:
twain = new Twain32();
twain.OpenDSM();
twain.OpenDataSource();             
twain.SetCap(TwCap.DuplexEnabled, true);            
twain.ShowUI = false;
And it works good, scanning front and back and not showing the UI. But the image is still black-and-white.
Wich capability should I set?
Thank you in advance.
Coordinator
Aug 18, 2014 at 3:16 PM
Edited Aug 18, 2014 at 4:07 PM
Hello, joelrlneto!
Try follow code:
this._twain32.Capabilities.PixelType.Set(TwPixelType.RGB);
See Saraff.Twain.Sample2, documentation of Saraff.Twain.NET and TWAIN Specification.
Marked as answer by joelrlneto on 8/18/2014 at 9:54 AM
Aug 18, 2014 at 4:54 PM
Thank you again, Saraff.
It works good now.