Copy link to clipboard
Copied
Hi all,
I've been searching for a while now for the best way to achieve this, but can't seem to find what i'm looking for.
It's basically this: I'm creating a template for our editors that will act as a shell or housing for any video/image that they put in. The shell then automatically resizes to fit around the image that the editors choose. The image/video file to be used in the template could be a variety of sizes and aspect ratios. They could be 16x9 video clips, a portrait oriented image, an old 4x3 video clip, anything really. Regardless of the size and ratio of the layer, no matter what, I want the resulting width in the scale property to be exactly 920 pixels, even if that means I will be scaling something up and losing resolution, for this project, that is ok.
This is where I run into an issue. I need the image/video to maintain its aspect ratio, but have a width of 920 pixels. I have found a few different ways to input a specific pixel size through an expression, but I only want to input the width, and have the expression give me the resulting height, if it were to maintain its original aspect ratio since the user could put in anything that they want.
Is there a way to do this without having to input the target size for the [1] position?
Thanks!
Like this maybe:
value*(920/width)
Dan
Copy link to clipboard
Copied
Like this maybe:
value*(920/width)
Dan
Copy link to clipboard
Copied
Yep, that was exactly what I was needing. I think I was trying to over complicate this more than it needed to be. Thanks so much for the help Dan!
Copy link to clipboard
Copied
Thank You