I am trying to display an image on a canvas using perl/Tk but it is not being displayed. The code i have written is
#!/pkg/qct/software/perl/current/bin/perl -w
use Tk;
use Tk::JPEG;
use Tk::Photo;
my $mw = MainWindow->new;
my $c = $mw->Canvas;
my $image = $c->Photo(-file => '/usr2/nikhilg/final_proj/Floorplan.jpg
+', -format=>"JPEG");
print $image;
$c->createImage(100,100, -image => $image);
MainLoop;
the $image that i am printing is displaying
Tk::Photo=HASH(some hex number), but image is not displayed on the canvas.
Any help will be highly appreciated. Thanks.