WIA 2.0 C#获得支持的DPI [英] WIA 2.0 C# getting supported DPIs

查看:90
本文介绍了WIA 2.0 C#获得支持的DPI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

我能够编写一个使用WIA自动化的应用程序,以使用自定义UI(而不是WIA对话框)从扫描仪获取图片.它还支持某些参数,例如黑白/彩色图片,缩放,裁剪和DPI.这是东西.我能读写 DPI设置,但不完全符合我的期望.例如,我的扫描仪可以轻松处理1200 DPI.但是WIA将其限制为100和300个选项.我不知道为什么,但是我可以接受;)我不知道我不知道如何获得那些支持的值. 有一个获取最大光学分辨率的属性,但是正如您所看到的,它与实际可能的值无关.我使用的除100和300之外的每个值都会出现错误,提示值未落在预期范围内". (类似的东西; p). 我已经在另一台扫描仪上进行了测试,问题仍然存在,只是DPI值不同.在高级设置窗口中,Paint可以使用默认的WIA UI获取这些值.

I was able to write an application that uses WIA automation for getting pictures from scanner with custom UI - not WIA Dialogs. It also supports some parameters like B&W/Color pictures, zoom, cropping and DPI. Here's the thing. Im able to read and write DPI settings, but not exactly as I wished to. For example my scanner can easly handle 1200 DPI. But WIA limits it to 100 and 300 options. I don't know why, but I can live with that ;) Im not ok with the fact that i don't know how to get those supported values. There's a property for getting the max optical res, but as you can see, it has nothing to do with actual possible values. Every value that I use other than 100 and 300 gives an error saying "Values do not fall within expected range" (something like that ;p). I already did testing on another scanner, and problem remains the same, only DPI values are different. Paint can obtain those values using deafult WIA UI in advanced settings window. How can I do this using C# only?

推荐答案

请检查以下链接

please check the following link

http://stackoverflow.com/questions/6215453/detect-all -可用的扫描仪分辨率使用WIA

通过therin描述的技术,您可以在c#中获得扫描仪支持的所有分辨率

You can get all the resolution suppoted by the scanner in c# by the technique described therin

此致

Stygen


这篇关于WIA 2.0 C#获得支持的DPI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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