If I state the purpose of my question as well as my question then hopefully this will be clear and why the other rather large range of answers on a similar topic aren't helpful.
Instagram uses square images in it's list, so I want to create a script to go into a folder of images and turn all of them into square images. But I don't want distortion or cropping. What I want is for the image to remain in the middle and the canvas to grow. Then any area that was added will be coloured either white or black.
I can do this manually but using the crop tool, telling it to be a square (ratio 1:1) and then dragging left to the edge and the right to it's edge. Or using Canvas resize, and copying the largest size (depends if image is portrait or landscape) and putting that into the smaller size. Then using flood fill to colour the transparent bars that are created.
Before ->
After ->
So how can I automate this process? Seems like there are human elements in my process that I can't automate and I guess there must be a way. I have the latest photoshop (also Lightroom if it can do it?).