TWAIN API for accessing scanners, cameras, etc on Windows
Project description
The Python TWAIN module provides an interface to scanners, digital cameras and
other devices which implement TWAIN, for the Windows platform. It provides the
functionality to allow a Python application to connect to the scanner/camera and
to retrieve images from that device.
The Python TWAIN module supports 32bit Windows only. It does not run on Apple
Computer Platforms or on UNIX based Platforms.
Example: Retrieve an image from a scanner
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')
other devices which implement TWAIN, for the Windows platform. It provides the
functionality to allow a Python application to connect to the scanner/camera and
to retrieve images from that device.
The Python TWAIN module supports 32bit Windows only. It does not run on Apple
Computer Platforms or on UNIX based Platforms.
Example: Retrieve an image from a scanner
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')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
twain-1.0.5.win32-py2.7.exe
(233.5 kB
view details)
twain-1.0.5.win32-py2.6.exe
(233.5 kB
view details)
File details
Details for the file twain-1.0.5.win32-py2.7.exe
.
File metadata
- Download URL: twain-1.0.5.win32-py2.7.exe
- Upload date:
- Size: 233.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 934b87a53d07fe31454af4e61b0289a9d9ee58c557523ca57d871d2ffc074a68 |
|
MD5 | 0a88895f0a3a104f903637d4b48d7f4b |
|
BLAKE2b-256 | 0eafc27fd93aabc2c9bb35e96ff4b02d2aaaf423715e4a42197c94f874beaf64 |
File details
Details for the file twain-1.0.5.win32-py2.6.exe
.
File metadata
- Download URL: twain-1.0.5.win32-py2.6.exe
- Upload date:
- Size: 233.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2cf1bf335535285b756de94c11f75f3a05f4bee1ed8bcd6e1e8ed44b1a844e2 |
|
MD5 | fc64a4bac06552abf22caac2729b8f36 |
|
BLAKE2b-256 | d818d0d5560cd08bf3df5370b267764904be5473b091d5da33d32cf600f11611 |