Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl Monk, Perl Meditation
 
PerlMonks  

Re: TK Photo Cam - Memory Leak

by Anonymous Monk
on Jul 15, 2002 at 22:26 UTC ( #181949=note: print w/ replies, xml ) Need Help??


in reply to TK Photo Cam - Memory Leak

Owell, I found the answer to my question. I guess I should'nt have rushed to post the question. To anyone else interested the following fixes the problem. Im still looking for an answer (or some hints) on the second part of my initial question.

sub update_image { my $data = encode_base64( get($CAM_URL) ); $buttonImage->configure(-data => $data, -format => 'jpeg'); $TT->configure(-image => $buttonImage); $mw->after( $UPDATE_INTERVAL,[\&update_image]); };


Comment on Re: TK Photo Cam - Memory Leak
Download Code
Re: Re: TK Photo Cam - Memory Leak
by ichimunki (Priest) on Jul 16, 2002 at 18:23 UTC
    You might try the Tk::Photo attribute '-subsample', to get the image to reduce by literally removing every x pixel from the image. You might also use ImageMagick (which has perl modules available and works on both Windows and Linux/Unix) to resize the image (I'm not sure if there is a way to use ImageMagick on data in memory, I've only ever used it on files).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-04-18 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (469 votes), past polls