TWAIN:如何获取图像扫描进度?
我必须使用 TWAIN 1.x 接口从扫描仪获取图像
一些旧扫描仪扫描时间太长,所以我想如何通知用户扫描进度。 有内置的弹出窗口,带有进度栏和“取消”按钮,但我想覆盖它。
WIA API 不是向我发送带有进度百分比的扫描片段,而是向我发送带有进度百分比的扫描片段,这样我就可以使用 WIA 来解决此任务,但是 TWAIN 呢?
我尝试了这个不错的 TWAIN 演示 http://www.codeproject.com/KB/audio -video/twaintest.aspx。
它使用消息循环进行扫描。我想扫描进度应该表示为发送到消息循环的消息集,但我错了。只有一些初始和最终消息。
有没有办法通过 TWAIN 1.x API 通知扫描进度?
先感谢您!
I have to get images from scanner with TWAIN 1.x interface
Some old scanners scan too long time so I guess how to notify user about scanning progress.
There is built-in popup window with progress bar and "cancel" button but it's something I want to override.
Instead of TWAIN WIA API sends me pieces of scan with progress percent so I can solve this task with WIA, but what about TWAIN ?
I tried this nice TWAIN demo http://www.codeproject.com/KB/audio-video/twaintest.aspx.
It uses message loop for scanning. I guess that scan progress should be represented as set of messages sent to message loop but I was wrong. There are only some initial and finalization messages.
Is there a way to be notified about scan progress with TWAIN 1.x API?
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
供将来参考...
无法通过 TWAIN API 获取扫描进度,也没有标准方法通过“作弊”获取扫描进度。正如 OP 所提到的,TWAIN 确实为您提供了一种要求 TWAIN 驱动程序显示(或不显示)进度对话框的方法,但该对话框是由单独的 TWAIN 驱动程序设计和操作的。
如果您不喜欢给定的驱动程序的进度框,则没有什么选择:
我的建议是将精力花在系统的其他一些您可以控制的方面。
For future reference...
There is no way to get scan progress through the TWAIN API, and no standard way to get it by 'cheating' either. TWAIN does give you a way to ask the TWAIN driver to display (or not) a progress dialog, as mentioned by the OP, but the dialog box is designed and operated by the individual TWAIN driver.
If you don't like a given driver's progress box, you have few choices:
My advice is to spend your effort on some other aspect of the system, where you have control.
如果使用内存传输模式从扫描仪获取图像,您可以获得图像扫描进度。本机和文件传输模式不允许获取图像扫描进度。进度步骤取决于 TWAIN 驱动程序。
You can get image scan progress if you acquire image from scanner using Memory transfer mode. Native and File transfer modes do not allow to get image scan progress. Progress step depends from TWAIN driver.