Webcam support

garabik-news-2005-05 at garabik-news-2005-05 at
Thu Aug 26 18:19:38 CEST 2010

Navkirat Singh <navkirats at> wrote:
> Hi Guys,
> I am programming a web centric app in python for customer, which needs
> to click a snap of the customer and forward the pic to the server via
> POST. I am not very familiar with how I can achieve this. Any
> direction would be much appreciated.

For something very similar, I used fswebcam, the crucial code looked
like this:

def capture_frame(filename, brightness=50):                                                  
    os.system('fswebcam -S 1 -r %s -s brightness=%i%% 
               --font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf 
               --jpeg 60 --save %s' % (RESOLUTION, brightness, filename))

| Radovan Garabík |
| __..--^^^--..__    garabik @     |
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread

More information about the Python-list mailing list