open my $fh, '<', \$buffer; my $bitmap = Wx::Bitmap->new(Wx::Image->new($fh, wxBITMAP_TYPE_PNG));