FORUMS: list search recent posts

# How do I scale a photo from composition width to height over 5 seconds?

FAQ   •   VIEW ALL
 How do I scale a photo from composition width to height over 5 seconds? on Jan 22, 2011 at 6:03:56 am

Hi there. Expression noob here. I'm looking for an expression for my slideshow photos.

The photos switch every 5 seconds. When the photos appear I want them to fill my composition horizontally (1920 pixels wide), and over 5 seconds zoom out until they fill my composition only vertically (1080 pixels high). I want the photos to maintain aspect ratio.

Thanks! :)

 Re: How do I scale a photo from composition width to height over 5 seconds?on Jan 22, 2011 at 6:46:10 am

Assuming that you have your layers trimmed to 5 sec and sequenced, something like this should work:

s1 = (1920/width)*100;
s2 = (1080/height)*100;
t1 = (index-1)*5;
t2 = t1+5;
linear(time,t1,t2,[s1,s1],[s2,s2])

Dan

 Re: How do I scale a photo from composition width to height over 5 seconds?on Jan 22, 2011 at 6:53:59 am

Thank-you sir for the quick reply!

 Re: How do I scale a photo from composition width to height over 5 seconds?on Jan 22, 2011 at 6:56:27 am

This is the one I ended up figuring out:

startScale = thisComp.height/height*100
endScale = 100
scaleUpTime =4

s = ease(time,inPoint,inPoint+scaleUpTime,startScale,endScale);
[s,s]

I'm learning quickly on Google there are many ways to accomplish expressions in After Effects lol.

I love this! Such a neat and tidy zoom!