#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Photo; use Tk::JPEG; # substitute any jpg file here, and it should be # scaled down by a factor of 4 and put in the # button my $file = "zen16.jpg"; my $w = new MainWindow; my $image1 = $w->Photo( -file => "$file", -format => 'jpeg' ); my $image = $w->Photo(); $image->copy( $image1, -subsample => 4 ); $b = $w->Button( -image => $image )->pack(); $b->configure( -image => $image ); MainLoop;