- 授权协议: GPLv3
- 开发语言: Python
- 操作系统: Linux
- 软件首页: https://github.com/jflesch/pyinsane
- 官方下载: https://github.com/jflesch/pyinsane
软件介绍
Pyinsane 是 Sane API (使用ctypes) 和抽象层的纯 Python 实现。支持 Python 2.7 和 3.x,要求 Pillow 和 libsane 支持。
实现简单扫描的代码:
device.options['resolution'].value = 300
# Beware: Some scanner have "Lineart" or "Gray" as default mode
device.options['mode'].value = 'Color'
scan_instance = device.scan(multiple=False)
try:
while True:
scan_instance.read()
except EOFError:
pass
image = scan_instance.get_img()
