Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Quartz Composer Aspect Ratio Resize

edited May 2013 in MixEmergency
Hi All,

I am trying to create a very simple composition that basically takes iTunes album artwork and resizes it using the correct aspect ratio.

Basically all I want to do is take the original artwork image, (let's say it is 1000x861), and resize it proportionally so that it is always 500px high. (so now the image would be 581x500).

This seems incredibly simple but I absolutely cannot figure out how to do it before it hits the sprite. Any ideas?

Even better would be able to figure out how to make it so that it displays whichever axis is larger at 500px. (i.e., if the image is horizontal it will display at 500x430, but if it is vertical it will display at 310x500, etc.)

Any help would be much appreciated!!
Thank you.

Comments

  • You should be able to work this out using the rendering destination dimensions patch, and image properties patch along with a bit of math to set the height and width of the sprite. The image will always fill the sprite, so it's just a question of working out the right scale factors between the rendering destination and the image dimensions.

    You can effect the image before with a ci filter to scale or transform, but manipulating the sprite dimensions would probably be easier.
  • Sorry, that should read image dimensions patch, not image properties patch.
  • Thanks for the reply!

    As someone who is terrible at math, any advice on where to start with that?
Sign In or Register to comment.