在今天的Macintosh上,TWAIN的状态是什么? [英] What is the state of TWAIN on the Macintosh today?

查看:318
本文介绍了在今天的Macintosh上,TWAIN的状态是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在一个项目中,我们要在PC(Windows)和Macintosh上与TWAIN扫描仪连接。



在Windows上,我们基本上已经完成了一切,代码可以与绝大多数扫描程序成功完成。



在Mac OS X上,我们也基本上有一切工作,我们用主要的扫描仪,我们用于完美的开发应用程序,但我们没有一个运气与其他扫描仪。作为这个项目开发的一个副产品,我们有来自不同制造商的相当数量的扫描仪在手进行测试。结果大不相同:




  • 我们用于开发的扫描仪在Mac OS X上与在Windows中一样完美。讽刺的是,这个扫描器是我们遇到的最便宜和最疯狂的扫描器(速度),但它一直是一个梦想。

  • 另一个扫描仪工作得很好 - 直到第二或第三扫描(我们从调试器获得EXEC_BAD_ACCESS)

  • 另一个扫描器显然在Mac OS X上没有TWAIN支持(没有数据源

  • 另一台扫描仪有一个通用的数据源,我想是要覆盖所有的图像捕获/ TWAIN数据源文件夹。可能的扫描仪,但是当我们尝试启动本机扫描(这是所有TWAIN数据源的要求),我们没有得到任何结果。

  • 另一台扫描仪有一个TWAIN数据源,显示为特定于该公司的TWAIN数据源。



所以我不知道这里去哪里。我仍然在挖掘代码,以找出什么,如果有什么,我们做错了,但在检查对TWAIN标准,它真的看起来像我们做的一切正确,但我们得到非常命中或 -



此外,作为新的Cocoa / Carbon Events模型的一部分,还有一个回调函数的额外考虑Mac OS X TWAIN数据源应该实现,我看不到它从大多数这些数据源/驱动程序调用。



所有这一切都让我想到 - 是我们只是做错了什么,或者是TWAIN只是不能在Macintosh上正常支持?



我真的没有在Macintosh在线上看到很多关于TWAIN的信息 - twainforum.org上的偶尔零星查询往往没有回答。 Windows也有一个名为WIA - Windows图像采集 - 在Windows端我们也包括这个选项。

解决方案

您可以尝试ImageCaptureCore.framework 。但是,您必须验证您给予解决方案的公司/模型扫描仪具有ImageCapture支持。
如果任何供应商提供了支持,那么ImageCapture模块将出现在位置'/ Library / Image Capture / Devices'中。



希望它有助于:-)


I'm currently working on a project where we want to interface with TWAIN scanners on both the PC (Windows) and the Macintosh.

On Windows, we basically have everything squared away and the code works successfully with the vast majority of scanners.

On Mac OS X, we also basically have everything working and with the main scanner we used to develop the application with works perfectly, but we're not having a ton of luck with other scanners. As a byproduct of development on this project, we have a fair number of scanners from various manufacturers on-hand to test with. The results vary wildly:

  • The scanner we used to develop with works perfectly on Mac OS X as it does in Windows. Ironically this scanner is the cheapest and crappiest scanner (speed-wise) we've ever encountered but it's been a dream to work with.
  • Another scanner works great - until the second or third scan, at which point the application crashes with no clear indication of what happened (we get an EXEC_BAD_ACCESS from the debugger)
  • Another scanner apparently has no TWAIN support on Mac OS X (no data sources in the "Image Capture/TWAIN Data Sources" folder), although it does have TWAIN support in Windows.
  • Another scanner has a generic data source that I'm thinking is supposed to cover all the possible scanners from this manufacturer but when we try to initiate a native scan (which is a requirement for all TWAIN data sources) we get no results. Also, trying to install a second scanner from this manufacturer gums everything up and requires a manual uninstall for everything from this company.
  • Another scanner has a TWAIN data source that appears to be specific to the manufacturer, but it also fails to initiate a native scan (but a scan using the native GUI - which is incompatible with our project - works)

So I'm not sure where to go with this. I'm still digging into the code to figure out what, if anything, we're doing wrong but in checking against the TWAIN standard it really does look like we're doing everything right, but we're getting very hit-or-miss results on most of the scanners we're testing against.

Also, as part of the new Cocoa/Carbon Events model there's this additional consideration of a "callback" function that Mac OS X TWAIN data sources are supposed to implement and I'm not seeing it called from most of these data source/drivers.

So all of this leads me to wonder - is it that we're just doing something wrong or is TWAIN just not supported properly by and large on the Macintosh?

I'm really not seeing a lot of information on TWAIN on the Macintosh online - the occasional sporadic inquiry on twainforum.org tends to go unanswered. Windows also has a thing called WIA - Windows Image Acquisition - and on the Windows side we also include this as an option. Is there something else on the Mac we should be exploring instead of or in addition to TWAIN?

解决方案

You can try ImageCaptureCore.framework. But you have to verify that the company/model scanners to which you are giving solution have ImageCapture support. If any vendor has given support then a ImageCapture module will be present in location '/Library/Image Capture/Devices'. You can also check the plists inside modules for supported models.

Hope it helps :-)

这篇关于在今天的Macintosh上,TWAIN的状态是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆