#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Photo; use Tk::PNG; my $file = shift or die "put a PNG file name on the command line"; my $mw = new MainWindow(); my $src = $mw->Photo(-format => 'png', -file => $file); my $tgt = $mw->Photo(-format => 'png', -data => $src->data(-format => 'png')); $mw->Label(-image => $tgt )->pack; MainLoop;