Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Auto scale pictures proportionately to comp width/height

  • Auto scale pictures proportionately to comp width/height

    Posted by Eric Hartmann on July 29, 2009 at 7:10 pm

    I’m working on a project that requires me to have several pictures on the right side of a comp, then scale up to full res.

    Basically what I need is an expression that will have any size image scale proportionately to the comp’s size.

    Can someone help me with how I need to word it in the expressions dialog box?

    Thanks!

    Dan Ebberts replied 16 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    July 29, 2009 at 8:06 pm

    If you can drive it off one dimension, it could look like this:

    nominalCompHeight = 480;
    value * thisComp.height/nominalCompHeight

    Or, if you need independent x and y scaling, it would look like this:

    nominalCompWidth = 640;
    nominalCompHeight = 480;
    [value[0]*thisComp.width/nominalCompWidth,value[1]*thisComp.height/nominalCompHeight]

    You need to specify the nominal comp width and height values that correspond to a scale of 100%.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy