深夜求解答,使用python的twain模块扫描A3,如何设置成A3输入?
官网http://twainmodule.sourceforge.net/docs/caps.html也有坑,比如介绍的以下一段
To set the current value of the capability, use the SetCapability method. This method take three parameters, the identity of the capabaility (CAP_*, ICAP_* or ACAP_*), the type of the value (as returned from GetCapabilityCurrent), and the new value.
>>> ss.GetCapabilityCurrent(twain.ICAP_IMAGEFILEFORMAT, TWTY_UINT16, TWFF_JFIF)
正确写法应该是ss.SetCapability(twain.ICAP_IMAGEFILEFORMAT, twain.TWTY_UINT16, twain.TWFF_JFIF)
我使用twain twacker查询和设置ICAP_SUPPORTEDSIZE结果如下
http://bcs.duapp.com/picstore/aMqibomfDN.pnghttp://bcs.duapp.com/picstore/txfl7TNTeV.png当然是用ss.SetCapability(twain.ICAP_IMAGEFILEFORMAT, twain.TWTY_UINT16, twain.TWSS_A3)
也是失败的,真感觉有点奇怪,为啥有这个值,但是设置的时候又会提示超出范围呢