my $bitmap_data = $wx_bitmap->GetImage->GetData; # serialise bitmap data # later... $wx_bitmap = new Wx::Image()->SetData($bitmap_data)->GetBitmap;