问题标签 [twain]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
629 浏览

java - 孪生扫描仪部分扫描

我使用 twain 2.1 连接到扫描仪。如何将扫描仪设置为仅扫描页面的一部分而不显示扫描仪的预览页面。我使用了 source.setRegionOfInterest 方法,但它没有完成扫描,并且扫描仪在重新启动之前无法使用。

0 投票
1 回答
1663 浏览

powerbuilder - 如何在 Powerbuilder 应用程序中使用 TWAIN

我们有一个 powerbuilder 应用程序,我们希望通过该应用程序使用 TWAIN 驱动程序来使用扫描仪。有没有人有关于如何开发它的经验或代码示例?

0 投票
0 回答
822 浏览

c# - Twain 扫描去除紫色边缘

我正在使用Twain Dot Net扫描相对简单的图像,最终我使用Emgu CV来查找边缘。这是我扫描的东西的屏幕截图:

白色/灰色图像

但是,我调整了图像检测中的阈值,我得到了完全相同的边缘检测,但它不是正确的位置(它太宽 - 我扫描的东西是灰色的)。如果我像这样扫描黑色图像,我会检测到我期望的边缘:

黑色图像

在这两种情况下,您都可以看到紫色边缘(真实物体上不存在)。

我的感觉是,这个紫色边缘导致边缘检测对第一个边缘检测做错事,因为它匹配紫色的位置,但对于黑色它匹配黑色的位置(因为黑色的强度高于紫色但灰色的强度不是)。我认为这可以解释为什么调整 emgu 中的阈值没有任何区别。

所以,我的问题是——我可以设置一个 twain 设置来移除这个紫色,还是它是扫描仪的一个功能(我在 Flickr 上发现了这个指向硬件的有趣讨论,但我已经用三种不同的扫描仪进行了尝试(两个相同的模型,一个完全不同的)并且它们都做同样的)?

这是我用来扫描图像的代码:

0 投票
0 回答
2695 浏览

delphi - Delphi Twain 和扫描仪状态

我正在尝试使用DelphiTwain (http://delphitwain.sourceforge.net/)获取有关我的扫描仪的一些基本信息——获取扫描仪名称和生产者非常容易,但我必须获取扫描仪状态并且找不到方法 ...

我想知道扫描仪是否在线、离线(关闭或分离)......如果可能的话,它是否正在扫描或处于错误状态。

谢谢你的帮助

0 投票
5 回答
5313 浏览

c# - 适用于 64 位机器的 .NET 扫描 API

是否有 .Net 扫描 API 可用于 64 位机器从扫描仪扫描文档或图像?谁能给我这个示例代码。

谢谢阿西夫

0 投票
0 回答
378 浏览

actionscript-3 - AIR 应用程序中的 TWAIN API

我希望看到对 Air 中图像采集设备的支持。我喜欢扫描 TWAIN API 并在 Air 应用程序中查看图片。

在 Web 上,我看到一些带有 Java 的模块,但在我的情况下,我无法在服务器上安装 java。

你知道如何使用 Twain api 和 AIR 吗?

谢谢

0 投票
1 回答
699 浏览

java - 使用 Morena 处理扫描仪卡纸

我一直在使用 Morena 库通过使用 Morenas TWAIN 实施的 ADF 扫描来扫描文档。但是,当扫描仪卡住时,我发现了一个问题,我的程序会崩溃并烧毁。我试过寻找一些方法来处理这个问题,但我只是想不出一种实用的方法。如果有人可以提出一种处理方法,将不胜感激。

0 投票
3 回答
22224 浏览

java - 在 java 中使用扫描仪设备的最佳解决方案(库)?

我正在从事一个桌面项目(使用 swing 开发),该项目适用于各种新旧扫描仪设备。我们想要一个可以与扫描仪设备一起使用的开源免费库。Twain 等扫描仪标准对我们来说并不重要,在 Windows(XP 和 7)下支持广泛的扫描仪对我们来说非常重要。请与我分享您对这个主题的经验。

谢谢。

0 投票
1 回答
2092 浏览

c# - twainlib 如何在 ShowUI = False 时设置扫描属性

我使用 TwainLib.cs 在我的 c# 项目中进行扫描,这段代码与我开始使用的相同

为了不显示扫描仪的 UI 界面,我使用 guif.ShowUI = 0 并且它可以工作,但图像质量较低,即使图像中的条形码未读取,

我一步一步地找到了 dpi 或发送的颜色位来更改它们的位置,但我失败了:/

当我在不显示 UI 的情况下进行扫描时,如何更改扫描质量(dpi、颜色...)?

编辑 :

我添加了 iinf.XResolution = 200 但结果相同(分辨率较低的图像)

如果隐藏了制造商的用户界面,我想知道在哪里可以插入 dpi 分辨率

0 投票
1 回答
672 浏览

java - restart java.exe from an applet

I have an applet packaged with a third part dll (from JTwain). My applet scans documents from the TWAIN compatible default printer. The applet fails on a paper jam and won't recover. The user navigates away from the page and the applet is destroyed. When returning to the page it fails again. Closing the browser (which kills java.exe process on the pc), and then returning to the page clears the problem and everything works.

I want to restart everything without requiring users to close down the browser. I've added a GUID query string to the URL's from which the applets resources are loaded - so I know nothing is being cached. I've checked in the windows task manager and there is no process created by the dll, it's all happening within the main java.exe process. I tried wrapping the scanning process in a thread so I could interrupt it in the stop or destroy methods (just in case the applets thread weren't stopped when the applet was destroyed), but that didn't work.

Any suggest would be greatly appreciated. Ideally I'd like some way to restart java when the applet unloads (but I doubt that's possible).

UPDATE

I've spent a couple of days trying to identify what causes the applet to fail. I still don't know :(

When the paper jam occurs something (not my code), is producing a couple of popups. The first alerts the user of the jam, and can be closed by clicking the OK button. The second says 'reading from device' and hangs. It cannot be close with the red, close window, icon in the top corner - I kill it from the task manager and windows asks to send a report regarding the 'non-responsive program'. I assume these popups are produced by the dll. And given that the second hangs, my assumption is that a thread started by the dll has hung while retaining a lock on some component of the TWAIN application. I get

..when I try to access the scanner.

I'm at a bit of a loss as to how I can get more information. I'm testing my applet on a windows virtual pc (so as to use ie7), and don't have a method for step debugging in this environment. (And it's crashing on third party code for which I have no source anyway)