Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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]); };

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://181949]
and the leaves swirl about...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2017-12-11 02:36 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (286 votes). Check out past polls.