
Can't seem to wrap my head around this one


I have a bunch of images with varying sizes and aspect ratios where I need to add white canvas so they end up with an aspect ratio of 4/3.
Example 1: If the image is 600 x 300 pixels, I need for IM to add a white canvas to the top and bottom so it ends up 600 x 450 pixels.
Example 2: If the image is 600 x 510 pixels, I need for IM to add a white canvas to the left and right so it ends up 680 x 510 pixels.
Thanks a gazillion in advance for any help!
