Extending canvas of images to match given aspect ratio
I need help locating a program/script/photoshop action (or something in this category) that can change the canvas size of images so that the resolution matches a given aspect ratio. I am making an e-commerce store and all of my product images have a white surrounding background. All my images are of different sizes, orientations and aspect ratios. I want to automatically change the canvas size of my images so that they match the aspect ratio i want – which again will lead to the images fitting perfectly in my e-commerce store.
Example: the aspect ratio i am looking to match is 2,314:1 (my thumbnail on the store which i want to match is 567px wide and 245px high. 567/245 = 2,314).
So if i have an image that is 1000px wide and 350px high the following is what i would want to do:
1. Extend the canvas so that the aspect ratio is 2,314
2. By dividing the image width by the wanted aspect ratio i find the exact hight my image needs to be. The image needs to be higher in this particular scenario (1000/2,314 = 432)
3. Now that i know it needs to be higher i want to extend the canvas and add white background color evenly spread on the top and bottom of the image, making the image 1000px wide and 432px high, with the only difference being white space on the top and the bottom of the image.
4. Save it to folder and start with the next image.
The next image could present a different case where the image is to high, and i need to extend the canvas evenly to the right and to the left. I would like this program/script/action to notice which sides need to be extended to match the given aspect ratio. If impossible i could also process landscape images in one turn and portrait images in one turn.
I am going to do this with over 1000 product images, so i really need a solution.
Check out http://skaugsport.effektivhjemmeside.no to look at some images and the problems with them.