-
Question-making positon and scaling expression
Hello, I am still very new to expressions. I am trying to make an expression for this scenario. I want to be able to insert any size picture, (however many pixels) and always have it conform to be the same size in my Comp, as well as the positioning to be the same. I was thinking for the position I can pick whip it to a picture that is the position I want, then just turn the opacity to 0 for the picture that I am parenting. This way it can stay in the same position as this image, but you just wont see this image that I”m not using. I thought this would be an easy solution, but I could be wrong.
But for the scaling I’m not sure exactly how I would write it. Like for example if the image is 440×500 pixels, and I go into the project folder and replace the file with a 1500×1400 image then in the comp, I want to make it fit exactly the size of the original image automatically, without me changing anything.
I realize too that the dimensions/ratio of the picture might be a problem as well, like for example if I have a picture that is formatted as 16:9 and I replace it with a 4:3 image, then have the scaling setup automatically to be a certain value, it will skew/distort the image.
I hope I am explaining this right, if it’s unclear let me know.
I appreciate anybody’s help. Thanks