use Wx; package MyApp; use strict; use vars qw(@ISA); @ISA = qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( undef, -1, "Image Resize", [100, 100], [450, 300] ); $frame->Show( 1 ); return 1; } package MyFrame; use strict; use vars qw(@ISA); use Wx qw(wxBITMAP_TYPE_BMP); @ISA = qw(Wx::Frame); sub new { my $class = shift; my $this = $class->SUPER::new(@_); my $image = Wx::Image->new('print.bmp',wxBITMAP_TYPE_BMP)->Scale(32,32); # my $bmp = $image->ConvertToBitmap(); old way, no longer supported my $bmp = ???; $this->{ImageViewer}= Wx::StaticBitmap->new($this, -1, $bmp); $this; } package main; my $app = MyApp->new(); $app->MainLoop();