C# 从扫描仪获取图像

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/244425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 19:37:08  来源:igfitidea点击:

get image from scanner

c#image-scanner

提问by Ovi

How do you get a image from the scanner using .NET (C#) on Vista? Preferably to have the possibility to set the DPI.

如何在 Vista 上使用 .NET (C#) 从扫描仪获取图像?最好有可能设置 DPI。

There are a few controls on the market that do this, but they don't seem to work very well.

市场上有一些控件可以执行此操作,但它们似乎效果不佳。

采纳答案by Mark Cidade

You can P/Invoke into twain_32.dll, like with the CodeProject sample at http://www.codeproject.com/KB/dotnet/twaindotnet.aspx.

您可以 P/Invoke 进入 twain_32.dll,就像http://www.codeproject.com/KB/dotnet/twaindotnet.aspx上的 CodeProject 示例一样。

There's also Window Image Aquisition automation in wiaaut.dll, for which you get an automatically-generated wrapper as in the Coding4Fun sample at http://blogs.msdn.com/coding4fun/archive/2006/10/31/912546.aspx

wiaaut.dll 中还有 Window Image Aquisition 自动化,为此您可以获得一个自动生成的包装器,如http://blogs.msdn.com/coding4fun/archive/2006/10/31/912546.aspx 上的 Coding4Fun 示例