Thanks a bunch! Wish i had you on speed dial, haha.
To keep this ball rolling: Is it possible to also att to the script that the finished result image should have som extra white canvas space around the edges? For instance if the product in my product image originally streches all the way to the edge of the image, it would be nice to add som "margins" to the end result.
So how would i for example add 30pc extra white space in the height and 15 px extra white space in the width after the other magic has been worked?