in reply to when i display a gif image in tk, the bottom half is black, why?
You may workaround the problem either by switching to a newer Perl/Tk version (I think both Tk800.025 and Tk804.027 should do), or use the -data option instead of the -file option to load the file. From memory, untested:
use MIME::Base64; { local $/ = undef; open(my $fh, "image1.gif") or die; binmode $fh; $buf = <$fh>; } $mw->Photo("image1", -data => encode_base64($buf));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: when i display a gif image in tk, the bottom half is black, why?
by Courage (Parson) on May 11, 2004 at 15:35 UTC |