4
# Shows how to scan a color image into a PIL rgb-image
7
# Get the path set up to find PIL modules if not installed yet:
8
import sys ; sys.path.append('../PIL')
11
print 'SANE version:', sane.init()
12
print 'Available devices=', sane.get_devices()
14
s = sane.open(sane.get_devices()[0][0])
17
s.br_x=320. ; s.br_y=240.
19
print 'Device parameters:', s.get_parameters()
25
# (For my B&W QuickCam, this is a grey-scale image. Other scanning devices
29
# Write the image out as a GIF file
32
# The show method() simply saves the image to a temporary file and calls "xv".