是否有 SOLID .NET WIA 组件?
我知道您可以在 .net 生态系统中使用 WIA,不会有太多麻烦,但我发现以这种方式使用 WIA 至少不稳定。我已经看到我的代码表现完美,根本无法工作,某些 WIA 功能无法工作并且根本拒绝播放,更不用说很好了。
您可以在我的WIA 2.0 HP ScanJet 7650 特定问题 没有得到任何评论的问题,更不用说在六个月内得到答复了。
因此,我愿意以合理的价格购买有效的 WIA .NET 组件 - 合理的价格最高为 300 美元。我一直在 ComponentSorce 上浏览,发现有很多价值 2000 美元的雷龙会进行 TWAIN,如果处理不当的话会吃小孩子,但没有一个 WIA .NET 组件。
哦,是的,还有一点抱怨——MSDN 上关于 WIA 的文档和示例确实非常不标准。
更新 - 对于所有认为这个问题可以通过阅读 WIA 上带有示例代码的概念验证和看起来可行的文章来解决的人 - 它不能。从看起来可行到对许多设备提供可靠的扫描支持需要做大量的工作。我已经使用 .net 中的 WIA 在我的计算机上测试了三种不同的扫描仪,当您认为您已经弄清楚了一些细节时,您插入另一个扫描仪,然后发现您还没有弄清楚任何事情。这就是为什么我愿意为此付出代价。
I know that you can use WIA from .net ecosystem without (too) much hassle, but I've found using WIA this way, well, at least erratic. I've seen my code behave perfectly to not working at all to some WIA features not working and refusing to play at all, let alone nice.
You can read about it in my WIA 2.0 HP ScanJet 7650 specific problems question which didn't get a single comment, let alone answer in six months.
So, I'm willing to buy WIA .NET component that works, for a reasonable amount of money - reasonable being up to $300. I've been browsing aroung ComponentSorce and there are many $2000 brontosaurses that do TWAIN and eat small children if not treated nice, but not a single WIA .NET component.
Oh yeah, and a little rant - MSDN's documentation and examples on WIA are really really substandard.
UPDATE - To all who think that this problem can be solved with reading proof-of-concept and look-it-works articles with sample code on WIA - it cannot. To get from look-it-works to reliable scanning support for many devices is a lot of work. I've tested three different scanners on my computer using WIA from .net, and just when you think you've got some detail figured out, you plug in another scanner and see that you haven't figured out anything. That is why I'm willing to pay for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你看过这篇文章吗?
http://10rem.net/blog/2010 /01/08/scanning-images-in-wpf-via-wia
上述项目可以从以下位置下载:
http://10rem.net/media/55896/petebrownwpfscannerdemo.zip
它是用 C# 编写的,所以这可能会有帮助。
Have you seen this article?
http://10rem.net/blog/2010/01/08/scanning-images-in-wpf-via-wia
The above project can be downloaded from:
http://10rem.net/media/55896/petebrownwpfscannerdemo.zip
It's in C#, so it may be of help.
您可能想检查设备是否支持 WPD< /a>,Vista 或更高版本中 WIA 的替换。如果设备不支持 WPD,请尝试使用 WIA 自动化层。它确实无法处理 WIA 设备特定的问题,但至少它有利于标准化行为。如果WPD和WIA都不支持,恐怕你必须处理旧的TWAIN接口。
Windows 驱动程序工具包中的 WIA 文档 与 Windows SDK 中的文档相同。如果驱动程序开发人员未能遵循 WIA 驱动程序指南,请不要感到惊讶。如果您使用 WIA 扫描仪树,请确保您了解 Windows XP,Vista 和 Windows 7。
.NET 扫描 API 上有关于 .Net 应用程序的这些 API 包装器的讨论。
You probably want to check if the device supports WPD, the replacement of WIA in Vista or later. If the device does not support WPD, then try access the device with WIA Automation Layer. It can't handle WIA device-specific problems for sure, but at least it is good for standardized behavior. If neither WPD nor WIA is supported, I am afraid you have to deal with the old TWAIN interface.
The WIA documentation in Windows Driver Kit is on par with the documentation in Windows SDK. Don't be surprised if a driver developer fails to follow the WIA driver guidelines. If you travel WIA scanner trees, make sure you are aware of the difference of tree layout for Windows XP, Vista and Windows 7.
There is a discussion about wrappers of these APIs for .Net applications at .NET Scanning API.
我会省钱并推荐阅读这样的文章:
http://www.codeproject.com/KB/cs/WebCamService.aspx
按照步骤操作,并调整代码以满足您的要求。
I would save the money and recommend reading an article like this one:
http://www.codeproject.com/KB/cs/WebCamService.aspx
Follow the steps, and adapt the code to meet your requirements.
我对这个问题发表了评论,但我想我应该将我刚刚遇到的新内容添加到这个链接集合中: https://github.com/baffles/derp-scan
看起来它可能是 WIA 库的开始,并且可能实际上可用(有一天)。
从代码来看,问题可能是某些属性仅用作设备属性,而某些属性仅用作项目属性(WIA_DPS_* 与 WIA_IPS_*): http://msdn.microsoft.com/en-us/library/windows/hardware/ff539542(v=vs. 85).aspx
它提到两者之间存在重叠,我猜没有两个扫描仪的行为方式相同...这是否意味着您应该同时设置它们?我不知道。我和你在一起,文档很糟糕。
TL;博士;从 codeproject 复制代码这次不会有帮助。
I commented on the question, but I figured I'd add to this collection of links with something new I just came across: https://github.com/baffles/derp-scan
It looks like it might be the beginnings of a WIA library that might actually be usable (some day).
From looking at the code, the problem might be some properties only work as device properties and some only work as item properties (WIA_DPS_* vs WIA_IPS_*): http://msdn.microsoft.com/en-us/library/windows/hardware/ff539542(v=vs.85).aspx
It mentions there that there is overlap between the two and I'm guessing no two scanners behave the same way... does this mean you should just set them both? I don't know. I'm with you, the docs are shite.
TL;DR; Copying code from codeproject isn't going to help this time.