Home › Forums › TWAIN Classic › Windows 7 64-bit does not recognize the pixel type setting
- This topic has 4 replies, 2 voices, and was last updated 10 years, 8 months ago by tctwain.
- AuthorPosts
We are using the twain dll with c-sharp for scanning.
We are using canon scanners – 2050, 2080, DR-c130 models.The application works fine on all these models. However while
scanning in DR-c130 on a Windows 7 64-bit machine it does not
seem to recognize the pixel-type setting to black-and-white.The documents are always scanned in as color resulting in large documents.
I am including the code we are using for your review.
The twProtocol says major and minor version as 1.9.Appreciate any help on this.
Thanks in advance,
Raj
~~~~~~~~~~~~~~~~~
...
TwCapability capPT = new TwCapability(TwCap.IPixelType, 0, TwType.UInt16);
//(TwCap.IPixelType = 0x0100
//(TwType.UInt16 = 0x0004
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, capPT);
if (rc != TwRC.Success)
{
Console.WriteLine("failed to set pixel type");
CloseSrc();
return TwAcquire.Failure;
}
...
...
[DllImport("twain_32.dll", EntryPoint = "#1")]
private static extern TwRC DScap([In, Out] TwIdentity origin, [In] TwIdentity dest, TwDG dg, TwDAT dat, TwMSG msg, [In, Out] TwCapability capa);
Did you try showing the user interface of the device and scan B/W images there?
Or you may also try your scanner with Twack and see if you can set the pixel type successfully.
If the same issue happens with twack, it should be the driver issue. Otherwise, you may double check with the code and see if you set the pixel type successfully.
Thanks,
Catherine Sea
http://www.dynamsoft.comCatherine,
Thanks for the reply. I will turn the show user interface and see if I can change the setting
and make it scan in black and white on windows-64-C130 combination. However, the goal is
to be able to scan without any user interface and programatically set the scan options.Also the same exact code works on windows-32bit-c130 combination and all other cannon scanner
models (2050, 2080 etc.) I am thinking the pixel type hexadecimal value is different or
the argument to that param is of different data type on 64-bit windows environment?anyone else faced similar issue?
– Raj
Hi Raj,
I think it might be related with the driver.
Are you using the 64-bit TWAIN driver on the Win 7 64 bit machine? Have you tested with Twacker x64 and see how it works?
Thanks,
Catherine Sea
http://www.dynamsoft.comwill give that a try and let you know.
thanks,
Raj- AuthorPosts