Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl $|=1; use strict; use Gtk2 '-init'; use MIME::Base64; use LWP::Simple; my $load_timeout = undef; my $CAM_URL = "http://www.livecam.com.au/livecam1/livecam.jpeg?mu +="; my $window = Gtk2::Window->new('toplevel'); $window->signal_connect(delete_event => \&delete_event); $window->signal_connect(destroy => sub { Gtk2->main_quit; }); $window->set_border_width(10); my $image = Gtk2::Image->new(); $window->add ($image); $image->show; $window->show; $window->show_all; do_load(); Gtk2->main; sub do_load { getstore($CAM_URL.time(),"/tmp/latest.jpg" ); $image->set_from_file("/tmp/latest.jpg"); $image->show; $window->show; unlink("/tmp/latest.jpg"); $load_timeout = Glib::Timeout->add (6500, \&do_load); }; 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Gtk2::Image Reloading Refreshing and scaling
by zentara (Cardinal) on Aug 09, 2005 at 18:15 UTC |