my $handler = Wx::JPEGHandler->new(); my $image = Wx::Image->new(); my $bmp; $handler->LoadFile( $image, $file ); $image->Rescale(320,240); $bmp = Wx::Bitmap->new($image); if( $bmp->Ok() ) { $this->{thumb_sb} = Wx::StaticBitmap->new($this->{thumb_panel}, -1, $bmp); }