This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, April 20, 2009 8:18:01 AM(UTC)
Groups: Registered
Posts: 3
I am currently building a application with twain support. I need to be able to capture the image without showing the user interface each time that a the user scan an image.
With most scanner, I acquire the image once with:
scannedImage = m_twain->AcquireToImage( Leadtools::Twain::TwainUserInterfaceFlags::Show ) ;
so it show the user interface and let the user configure the scanner device. Then, since I want to acquire the image, with the same parameter setuped previoulsy, without showing the user interface, I do:
scannedImage = m_twain->AcquireToImage( Leadtools::Twain::TwainUserInterfaceFlags::None ) ;
And normally it work properly.
Except, with flat bed scanner (CanoScan 4400F and CanoScan 8800F), when I acquire an image with the TwainUserInterfaceFlags::Show, I see the UI and I obtain the right image. But after, when I try to acquire an image with the TwainUserInterfaceFlags::None I obtain a preview image (as if I have press the preview button in the twain user interface) instead of the image setuped privously.
I know that the parameter that I have enter, when the userinterface is shown, are still there because if I reshow the twainUI I have the exact same parameter that I have enter previously.
Does some one know how to solve this problem? Does some ones else had this problem?
#2
Posted
:
Tuesday, April 21, 2009 1:21:54 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
It appears some Twain drivers do not use the UI settings if you use the TwainUserInterfaceFlags.None flag.
To work around the limitation in such a driver, you can programmatically set the capabilities you need such as Pixel Type (TwainCapabilityType.ImagePixelType) and DPI (TwainCapabilityType.ImageXResolution and TwainCapabilityType.ImageYResolution) before every scan operation.
To set the values you need, you can use the TwainSession.SetCapability() method.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.