NaSe77 has asked for the wisdom of the Perl Monks concerning the following question:
but there must be a better way to do this... perhaps anyone has a better idea or a version of Tk::PNG for win32 ...if ($OSNAME =~ /linux|unix|bsd/i){ require Tk::PNG; $image = $pic_window->Photo("button", -file => $photo_name, -format => 'png'); } elsif ($OSNAME =~ /win/i ){ require GD; require Tk::JPEG; require MIME::Base64; my $im = GD::Image->newFromPng($photo_name); my $img = MIME::Base64::encode_base64($im->jpeg()); $image = $pic_window->Photo("button", -data => $img, -format => 'jpeg'); } my $label= $pic_window->Label(-image => "button");
----
NaSe
:x
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Viewing .png's under win32 / There must be a better way....
by PodMaster (Abbot) on Aug 29, 2002 at 10:56 UTC | |
by NaSe77 (Monk) on Aug 29, 2002 at 13:59 UTC | |
|
Re: Viewing .png's under win32 / There must be a better way....
by particle (Vicar) on Aug 29, 2002 at 13:30 UTC | |
by NaSe77 (Monk) on Aug 29, 2002 at 13:58 UTC |