I was clicking and viewing a bunch of JPEG's, and my hand became really tied... so I treated myself with this little Tk tool, which shows all JPEG's in a folder one by one, like a slide show, and it is only < 20 lines long. One really nice feature is that it even handles broken JPEG's (see inline comment):
use Tk; use Tk::JPEG; use File::Glob ':glob'; my @jpgs = bsd_glob('*.jpg'); my $index = 0; my $mw = MainWindow->new(title => "JPEG"); my $b = $mw->Button()->pack(); $mw->after(1000, \&next_image); MainLoop; sub next_image { #the eval was not there at the beginning, but then I had some brok +en image, and the application stoped... eval {$b->configure(-image => $mw->Photo('-format' => 'jpeg', -fil +e => $jpgs[$index])); $mw->configure(-title => $jpgs[$index]) }; $mw->after(1000, \&next_image) if (++$index <= $#jpgs); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: slide view of a folder a JPEG's
by pg (Canon) on Oct 25, 2004 at 16:00 UTC | |
Re: slide view of a folder a JPEG's
by zentara (Cardinal) on Oct 25, 2004 at 13:33 UTC | |
Re: slide view of a folder a JPEG's
by thor (Priest) on Oct 25, 2004 at 18:39 UTC | |
by popeurbanx (Novice) on Oct 27, 2004 at 16:55 UTC | |
Re: slide view of a folder of JPEG's
by zentara (Cardinal) on Oct 26, 2004 at 13:15 UTC | |
by pg (Canon) on Oct 26, 2004 at 16:04 UTC | |
Re: slide view of a folder of JPEG's
by eyepopslikeamosquito (Archbishop) on Oct 27, 2004 at 06:51 UTC |