Hardware Reference
In-Depth Information
To install it, run the following command from within the source directory:
$ su -c 'python setup.py build install -O1 --skip-build'
Finally, save the following Python script as photobooth.py , and you're ready to go
(we've broken it up to explain the various sections and how you can adapt it to your
purposes):
#!/usr/bin/python
# photobooth.py - version 0.3
#
# Copyright (C) 2011 Luke Macken <lmacken@redhat.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Requires: python-imaging, qrencode, gphoto2, surl
import os
import surl
import Image
import subprocess
from uuid import uuid4
from os.path import join, basename, expanduser
The script goes through a series of steps:
1. Uses gphoto2 to detect the camera.
2. Asks you to press Enter, and when you do, it tells the camera to take a photo,
which it saves locally.
3. Applies a watermark to the lower-right corner of the photo.
4. Uploads the photo to the server you specify.
5. Generates a QR code that points to the image's URL so that your subjects can
download their photos easily by scanning the QR code with their phones.
Search WWH ::




Custom Search