in reply to Re^3: Which tk to use and how to show images?
in thread Which tk to use and how to show images?
For it to work, I had to make sure the data is base64 encoded ...
Now you mention it, I think I had to go that route also. It was a while ago.
That said, logic suggests that you should be able to bypass IO::String, and pass the output from gd directly to encode_base64():
my $png = $mw->Photo(-data => encode_base64( $gd->png ));
I see no reason that shouldn't work as what ends up in the file is exactly what comes out of the image methods, hence the need for binmode;
I've made quite a lot of use of GD (though I hardly qualify as an expert), but I am light on Tk;
(Grrr. I hate being unable to try stuff, and I hate the available upgrade paths for perl.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Which tk to use and how to show images?
by rcseege (Pilgrim) on Nov 04, 2005 at 04:56 UTC |