#21 better control for movies of bitmaps

closed-fixed
None
5
2004-10-12
2004-10-07
No

Aquaterm is a great as a front end for displaying
bitmaps from perl scripts. However, it is a little less
ideal in its native configuration for displaying a
series of bitmaps as a movie. If you keep adding
bitmaps aquaterm consumes more and more memory. If you
call aqtClearPlot() in between adding bitmaps to free
up the memory it also forces a redraw of the plot,
causing the window to display the background color.
This isn't bad, but it does create an annoying flicker.
I've dealt with this by adding a variant of the method
aqtClearPlot() which has the line "[thePlot draw]"
commented out (in AQTClientManager.m). It would be nice
if something like this was incorporated into future
versions of aquaterm, or even better, if there was some
way to modify a previously created bitmap. This way you
wouldn't lose all the other plot items when you wanted
to update the bitmap.

Discussion

  • Per Persson

    Per Persson - 2004-10-08
    • assigned_to: nobody --> persquare
    • status: open --> open-accepted
     
  • Per Persson

    Per Persson - 2004-10-08

    Logged In: YES
    user_id=350616

    I'd say that this almost counts as a bug..., I do however have a
    suggestion (of the top of my head, not tested):
    * try using aqtEraseRect() to clear the previous image, it's safe to specify
    a somewhat larger region since it only clears object _completely
    contained_ in the rect

    Now, the previous image _should_ really have been removed, so this could
    be a bug.
    Could you please provide a script that exposes this problem? It would save
    me time in tracking it down.

     
  • Hazen Babcock

    Hazen Babcock - 2004-10-08

    Logged In: YES
    user_id=1119203

    The (hopefully) attached c program demonstrates the problem.
    This program will quickly slow down as more and more bitmaps
    are added to the image. Using top, it appears that this is
    because the amount of memory consumed by aquaterm grows with
    each added bitmap. I did find that if I commented out the
    aqtRenderPlot() line then this problem went away, but then
    of course one can't see the new bitmap.

     
  • Hazen Babcock

    Hazen Babcock - 2004-10-08

    a c program that exposes the problem

     
    Attachments
  • Hazen Babcock

    Hazen Babcock - 2004-10-08

    Logged In: YES
    user_id=1119203

    I tested it and adding aqtEraseRect() before adding another
    bitmap does resolve the problem. I.e., changing the program
    example.c to :

    aqtEraseRect(0,0,400,400);
    aqtAddImageWithBitmap((const void *) image, 400, 400, 0, 0,
    400, 400);
    aqtRenderPlot();

    Thank you for pointing this one out.

     
  • Per Persson

    Per Persson - 2004-10-10

    Logged In: YES
    user_id=350616

    I got the example code, thanks, and I'll fix this for the next release.

     
  • Per Persson

    Per Persson - 2004-10-12
    • status: open-accepted --> closed-fixed
     
  • Per Persson

    Per Persson - 2004-10-12

    Logged In: YES
    user_id=350616

    Fix in CVS.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks