StamPL - a Perl replacement for Stamp

What is StamPL ?
StamPL is a Perl replacement for the stamp program by Patrick Keane et al. Stamp core dumped on me for some reason, therefor I did a quick hack. StamPL adds a small text signature in webcam shots.

Download Stampl
Stampl can be fetched here.

What do I need to get StamPL up and running ?
StamPL extensivly uses GD, and the underlying gd libraries. GD is the graphic manipulation module written by Lincoln Stein and can be downloaded from CPAN (http://search.cpan.org/search?dist=GD).
GD itself is based on the gd library from Thomas Boutell and can be downloaded from his site (http://www.boutell.com/gd/). Please make sure both GD and gd are installed properly.

You also need the Net::FTP module for uploading. Net::FTP is part of the libnet package and can be downloaded from CPAN (http://search.cpan.org/search?dist=libnet).

You will also need software to grab your webcam feed and dump it to a file. Currently the script uses cqcam package (http://www.cs.duke.edu/~reynolds/cqcam/) but any webcam package that can dump feed to files will do.
Check the FAQ

Sample output



Configuring StamPL
Since StamPL is an ordinary perl shell script, you'll have to edit the file directly. The following settings are considered standard. For more advanced tips, check HACKING.
$inputfile = "/tmp/me.jpg"; # Local input filename
This is the filename and directory of the local filename. Your webcam feedgrabbing appliction will dump it there (if hopefully called correctly).

$outputfile = "/tmp/recent.jpg"; # Local output filename
This is the filename and directory of the local filename when StamPL has done its job.

$remotefile = "recent.jpg"; # Remote filename
This is the filename of the remote file.

$remotedir = ""; # Remote directory
This is the remote directory.

$hostname = "ftp.myhost.com"; # Remote hostname
This is the FTP address of your host. This is the same as you use to upload your files to your website.

$username = "user"; # username for remote host
This is the user login for the host defined above NOTE: If you have to use an @ in your login, use a \@ above instead.

$password = "password"; # password for remote host
This is the password for the above user login, on the above host.

$interval = 45; # Amount of seconds to wait before uploading again
This is the amount of seconds StamPL will wait after uploading the image.

$textbot = "StamPL - Test"; # The text that should be added at the bottom
This text will be added on the image.

Edit the script file with a normal editor.

Using StamPL

StamPL will not automatically stop, since its kinda in an infinite loop. You can start StamPL as a background process (on some platforms) with the following line :
	    ./stampl.pl &
If you did not chmod the script as it should, or you are on a platform that does not allow chmod'ing, try :
	    perl stamp.pl &
or even :
	    perl stamp.pl
if your platform does not support background processes.

Greetz
Greetz go to all of Undernet's #CGI Ops.