Amoe has asked for the wisdom of the Perl Monks concerning the following question:
I'm a pretty total newbie to Tk, and I wanted to play with JPEG support. I searched CPAN and checked out Tk::JPEG, which seemed suited for my purposes. So I installed it, read the Tk documentation and tried to write a small script which will display the file 'test.jpg'. However, when I tried to run this:
I was greeted with the fateful words:use strict; use warnings; use Tk; use Tk::JPEG; my($main_window); $main_window = MainWindow->new(); $main_window->Photo(-format => 'jpeg', -file => 'test.jpg')->pack; MainLoop;
Not to be put off, I tried specifying more arguments to the pack function., specifically '-side => 'bottom'' and '-expand => 1'. Rather annoyingly, this caused the following incomprehensible error message:'wrong # args: should be "pack option arg ?arg ...?" at tk.pl line 9.'
Removing either of the arguments furnished no solution. The most helpful thing someone could do here would just be to post a very basic chunk of Tk::JPEG using code, that I could learn from. I expect it's something really simple I'm missing here, but hey, better to ask and be a fool for five minutes...'bad option "image1": must be configure, forget, info, propagate or sl +aves at tk.pl line 9'
|
---|
Replies are listed 'Best First'. | |
---|---|
(ichimunki) Re: Tk::JPEG
by ichimunki (Priest) on Aug 14, 2001 at 01:29 UTC | |
by Amoe (Friar) on Aug 14, 2001 at 14:00 UTC | |
by Jouke (Curate) on Aug 16, 2001 at 12:20 UTC | |
by ichimunki (Priest) on Aug 16, 2001 at 16:40 UTC | |
by Jouke (Curate) on Aug 16, 2001 at 16:50 UTC | |
by ichimunki (Priest) on Aug 16, 2001 at 17:06 UTC | |
by padawan_linuxero (Scribe) on May 15, 2008 at 22:52 UTC |
Back to
Seekers of Perl Wisdom