How to add delay and how to optimize animation

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
brody
Posts: 2
Joined: 2011-01-04T22:13:08-07:00
Authentication code: 8675308

How to add delay and how to optimize animation

Post by brody »

Hello,

I'm creating an animation which goes something like this:

frame x, frame y, frame z
pause
reverse, i.e. frame z, frame y, frame x
pause
repeat

Here's my (somewhat pseudo)code:

Code: Select all

im->Set(size => "${width}x${height}");
$im->[$frameno++]->Draw(x...
$im->[$frameno++]->Draw(y...
$im->[$frameno++]->Draw(z...
pause 10
$im->[$frameno++]->Draw(z...
$im->[$frameno++]->Draw(y...
$im->[$frameno++]->Draw(x...
pause 10
Right now I'm repeating the frame before pause to introduce a delay, but it adds up in file size. What's the best way to add delay, without adding much to the file size?

Also, since I'm rewinding the film, so to speak, is there a way to do this animation without having to add frame z, y, x again?

Thanks much for your help!
brody
Posts: 2
Joined: 2011-01-04T22:13:08-07:00
Authentication code: 8675308

Re: How to add delay and how to optimize animation

Post by brody »

No response, no suggestions? Not for either part of the problem? Please post any ideas you may have . Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to add delay and how to optimize animation

Post by fmw42 »

Post Reply