Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Memory File and wxPerl

by jmlynesjr (Deacon)
on Mar 24, 2016 at 23:02 UTC ( [id://1158761]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Memory File and wxPerl
in thread Memory File and wxPerl

Findings:

Base GD can't output to an XPM file. However, I found the CPAN module GD::Convert that adds output options to GD, one of which is XPM. This seems to work as advertised and didn't have a problem creating the 600x600 image memory file.

NewFromPNGData is not wrapped in Wx. Per Mark Dootson(wxperl-users), the work around is:

open my $fh, '<', \$buffer; my $bitmap = Wx::Bitmap->new(Wx::Image->new($fh, wxBITMAP_TYPE_PNG));

This works as well. I plan to try both methods and see if there is any speed difference(currently at a 35msec screen refresh rate). My gut feel is that I might not see a speed increase. The small file size may have been writing/reading within Linux I/O buffers and not from physical disk. More testing needed.

James

There's never enough time to do it right, but always enough time to do it over...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-19 01:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found