Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Using GD on MS Windows

by strat (Canon)
on Aug 30, 2006 at 08:41 UTC ( #570334=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Using GD on MS Windows
in thread Using GD on MS Windows

The following way should work with Tk (haven't tested it):

use MIME::Base64; # ... your GD code from above my $imageData = $image->png; # save $imageData to file with binmde... well you know that... open( my $PNG, ">", $imageFilename ) or die ...; binmode( $PNG ); print $PNG $imageData; close( $PNG ) or die ...; # convert $image to tk photo my $imageData64 = MIME::Base64::encode_base64( $imageData ); my $photo = $mw->Photo( -format => 'png', -data => $imageData64, ); # do something with $photo...

I used a similar way for a little slideshow I wrote...

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"


Comment on Re^3: Using GD on MS Windows
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://570334]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-01-31 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (258 votes), past polls