How to add delay and how to optimize animation
Posted: 2011-01-04T22:21:07-07:00
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:
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!
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
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!