Working solution with Tk::Animation :
It's create an animated gif with some flat gif files
#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Animation; my $mw = MainWindow->new; $mw->title("Animated GIF"); my @gif_files = qw/mygif.gif mygif1.gif/; my $animate = $mw->Animation; for (@gif_files) { $animate->add_frame( $mw->Photo( -file => $_ ) ); } $animate->set_image(0); my $lab = $mw->Label( -image => $animate )->grid; my $start = $mw->Button( -text => 'Start', -command => [ $animate => 'start_animation', 500 ] )->grid; my $stop = $mw->Button( -text => 'Stop', -command => [ $animate => 'stop_animation' ] )->grid; MainLoop;
Update : link to the gif files
hth,
PooLpi
In reply to Re: Create an animated gif
by poolpi
in thread Create an animated gif
by kanegr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |