什么是TWAIN?
TWAIN(全写:Technology Without An Interesting Name)是一个软件和数码相机、扫描仪等图像输入设备之间的通讯标准。
简单的说 TWAIN是通用的扫描仪标准,我们使用TWAIN标准操作扫描仪
使用的框架:https://github.com/soukoku/ntwain/tree/v3
相关代码
#!c#
// can use the utility method to create appId or make one yourself
var appId = TWIdentity.CreateFromAssembly(DataGroups.Image, Assembly.GetExecutingAssembly());// new it up and handle events
var session = new TwainSession(appId);session.TransferReady += ...
session.DataTransferred += ...// finally open it
session.Open();