#!/usr/local/bin/perl -w use Tk; use Tk::Thumbnail; use strict; my $mw = MainWindow->new; my $skel = $mw->Photo(-file => 'images/tkskel.gif'); my $tn = $mw->Thumbnail( -images => [qw/tkjuke-large.gif tkhpcal-large.bmp/], -width => 128, -height => 128, -command => sub { my ($label, $file_name) = @_; my $i = $label->cget(-image); $i->write("$file_name.gif", -format => 'gif'); print "wrote '$file_name.gif' ...\n"; }, @ARGV); $tn->pack; MainLoop;