isync has asked for the wisdom of the Perl Monks concerning the following question:
This works.my $images_sm = Wx::ImageList->new( 16, 16, 1 ); $images_sm->Add( Wx::Bitmap->new("bin/icons/$_.gif", wxBITMAP_TYPE_GIF +) );
I hope I did not infuse an error while copy&paste'ing the simplified code...use MIME::Base64 (); $raw_data = "R0lGODlhEAAQAJEAAAAAAP///+vc3AAAACwAAAAAEAAQAAACDpSPqcvtD +6OctNqLsz4FADs="; my $icon_data = MIME::Base64::decode_base64( $raw_data ); my $images_sm = Wx::ImageList->new( 16, 16, 1 ); my $file = IO::Scalar->new( \$icon_data ); my $image = Wx::Image->new(); $image->LoadFile( $file, wxBITMAP_TYPE_ANY ); close($file); $images_sm->Add( Wx::Bitmap->new($image, -1) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What's wrong with this Wx::Bitmap construction?
by almut (Canon) on Feb 25, 2010 at 20:57 UTC | |
by isync (Hermit) on Feb 26, 2010 at 15:52 UTC | |
|
Re: What's wrong with this Wx::Bitmap construction?
by Anonymous Monk on Feb 26, 2010 at 07:39 UTC | |
by isync (Hermit) on Feb 26, 2010 at 15:38 UTC | |
by Anonymous Monk on Feb 27, 2010 at 00:12 UTC | |
by Anonymous Monk on Mar 02, 2010 at 17:36 UTC | |
by Anonymous Monk on Mar 03, 2010 at 09:15 UTC | |
|
Re: What's wrong with this Wx::Bitmap construction?
by isync (Hermit) on Mar 03, 2010 at 11:34 UTC | |
|
Re: What's wrong with this Wx::Bitmap construction?
by stefbv (Priest) on Jun 27, 2010 at 15:29 UTC |