#!/usr/bin/perl -w use strict; use Tk; use LWP::UserAgent; my $ua = LWP::UserAgent->new( timeout => 30, keep_alive => 1 ); sub get_photo { my $r = $ua->get('http://fiver.homeunix.com/images/webcam.jpg'); return $r->content if $r->is_success; } my $mw = new MainWindow; my $l = $mw->Label( -text => 'Wbscam', -foreground => 'blue', -font => [qw/-size 100 -slant italic/] ); $l->pack(); $mw->repeat(10000 => sub { $l->configure(-image => $mw->Photo( -data => encode_base64(get_photo()), -format => "jpeg" )); }); MainLoop;
Makeshifts last the longest.
In reply to Re: Webcam snapshot viewer
by Aristotle
in thread Webcam snapshot viewer
by bizzach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |