Hardware Reference
In-Depth Information
# This assumes ssh-agent is running so we can do password-less scp
ssh_image_repo = 'fedorapeople.org:~/public_html/photobooth/'
# The public HTTP repository for uploaded images
http_image_repo = 'http://lmacken.fedorapeople.org/photobooth/'
[source, python]
Define the size of the QR code you want to display:
# Size of the qrcode pixels
qrcode_size = 10
# Whether or not to delete the photo after uploading it to the remote server
delete_after_upload = True
[source, python]
People will scan the QR code to visit your web page and download their photos. Then
choose whether to save photos after they've been uploaded. If you're doing this at a
conference, that directory can fill up quickly if you save them!
When you want to change picture quality and size or are having trouble with the photo,
you'll want to consult the gphoto2 configuration options, which you can set here:
# The camera configuration
# Use gphoto2 --list-config and --get-config for more information
gphoto_config = {
'/main/imgsettings/imagesize': 3, # small
'/main/imgsettings/imagequality': 0, # normal
'/main/capturesettings/zoom': 70, # zoom factor
}
Choose which service to use to create your short URLs (options include a.gd, bit.ly,
burnurl.com, cli.gs, decenturl.com, digg.com, is.gd, kl.am, liip.to, metamark.net,
sn.im, snipr.com, snipurl.com, snurl.com, tinyurl.com, tr.im, turl.ca, ur.ly, and zz.gd):
# The URL shortener to use
shortener = 'tinyurl.com'
The Photobooth class includes most of the hard work for this setup:
class PhotoBooth(object):
def initialize(self):
""" Detect the camera and set the various settings """
cfg = ['--set-config=%s=%s' % (k, v) for k, v in gphoto_con
fig.items()]
subprocess.call('gphoto2 --auto-detect ' +
' '.join(cfg), shell=True)
Search WWH ::




Custom Search