Web template
updated by
Christopher Spry
2 May 2014

Guide for making an IndyCam 'picture' in a WWW page

or using an IndyCam to provide WWW clients with a picture on demand


If you want to use the IndyCam on your Silicon Graphics Computer to take 'snapshot' pictures and post them to Internet clients who are accessing your web server:

(1) Add a link to an HTTP document called: http://name.of.your.webserver/cgi-bin/picture.

(2) Put a file called 'picture' in the cgi-bin directory of your web server. My directory is: /var/www/cgi-bin, for example.

  • make ~/cgi-bin/picture '-rwxr-xr-x'

  • 'picture' contains the script:

#!/bin/sh
name=$REMOTE_HOST
cd /tmp
/usr/sbin/vidtomem -f $name 1> /dev/null 2>&1
/usr/sbin/imgcopy ${name}-00000.rgb ${name}.jpg 1> /dev/null 2>&1
echo Content-type: image/jpeg
echo
cat ${name}.jpg
rm -f ${name}*

I thank Robert Harris R.M.Harris@msm.cam.ac.uk for writing and debugging this script.

Further information

For those who have a Silicon Graphics support contract and so can access SGI 'Pipeline' articles, there is more information about putting video clips and snapshots on a Web page at http://support.sgi.com/surfzone/content/pipeline/html/19990201VideoWeb.html

Lachlan Cranswick has advice on web cams including sample scripts, information on dynamically altering shutter speeds and publishing pictures of difficult subjects, such as the sky.

Return to the 'home page'

Return to the `Computing index page'

Return to the 'Indy administration index'