Using Twain Module in Python

喜欢而已 提交于 2019-12-11 12:10:50

问题


I have 64 bit Windows and 64 bit Python . In the twain docs said : supports only 32 bit . I have used twain data source to install my 64 bit machine and used this code to connect scanner device:

import twain
sm = twain.SourceManager(0)
ss = sm.OpenSource()
ss.RequestAcquire(0,0) 
rv = ss.XferImageNatively()
if rv:
   (handle, count) = rv
twain.DIBToBMFile(handle, 'image.bmp')

When I run the app. a windows opens like :

so why this window is empty . The scanner device will show in this window ?

来源:https://stackoverflow.com/questions/34855258/using-twain-module-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!