OS X Mac 和编写 twain 扫描应用程序
有人可以指出我开始开发 MAC osx twain 扫描应用程序的正确位置吗?我过去做过一些简单的 Objective C 开发,但没有与设备交互。
Can someone point me to the correct place to start development of a twain scanning appliation for the MAC osx. I have done some simple objective c development in the past, but nothing interfacing with a device.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您谈论的是 Mac 上的 Objective-C 和 TWAIN,请访问 twain.org 网站上的此页面您可以下载一个 DMG,其中包含一个名为 TWAINClientCocoa 的示例项目。
它是 2002 年左右的版本,因此需要一些技巧才能加载和构建(将 .pbproj 文件夹重命名为 .xcode 文件夹,这样它将在 Xcode 中打开,然后在 Xcode 中进行“升级”)但它有效(上周刚刚尝试过)并且应该为您提供一个良好的起点。它依赖于 TWAIN 源的概念,在 GUI 上提供它,但这是您可以修改的内容。
If you're talking about Objective-C and TWAIN on the Mac, this page on the twain.org site has a DMG you can download which contains a sample project called TWAINClientCocoa.
It's from 2002 or something so it requires a little finagling to get it to load and build (rename the .pbproj folder to be a .xcode folder so it will open in Xcode and then do an "upgrade" when you're in Xcode) but it works (just tried it last week) and should give you a good starting point. It relies on the concept of the TWAIN source providing its on GUI but that's something you could modify.
如果有人对此仍然感兴趣,我刚刚在 macOS 上为我的应用程序编写了一个 TWAIN 客户端。 此文档非常有帮助。
今天这样做的主要问题是本机传输模式返回的
PicHandle
需要一些已弃用的函数来操作。在我的系统(10.13)上,我可以通过弥补这些函数的标头来解决这个问题,但它们可能会在将来的某个时候被完全删除。可能值得尝试使用更复杂的内存传输模式。If someone if still interested in this, I have just written a TWAIN client on macOS for my application. This documentation is quite helpful.
The main problem doing this today is that the
PicHandle
returned by native transfer mode requires some deprecated functions to operate on. On my system (10.13) I can workaround this by making up the headers for those functions but they might be removed totally some time in the future. It's probably worth trying to use memory transfer mode which is more complex.