Seems to only work if you base64 encode the binary
pojuse 5.010; use strict; use warnings; use LWP::UserAgent; use Tk; use Tk::PNG; use MIME::Base64; my $url = 'http://www.perl.com/images/ads/tpcip_banner-1200x150.png'; my $ua = LWP::UserAgent->new(agent => ''); my $response = $ua->get($url); die $response->status_line if not $response->is_success; my $data = MIME::Base64::encode_base64($response->decoded_content()); my $mw = MainWindow->new; my $photo = $mw->Photo(-data => $data, -format => 'PNG'); $mw->Label(-image => $photo)->pack(); MainLoop;
In reply to Re^3: Downloading KeyForge image
by poj
in thread Downloading KeyForge image
by Stamm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |