I'm finding it hard to find a solution to what I'm trying to do.
Simply put, the usage of these images is for an online store.
The IrfanView batch processing using the autio crop borders basically sorts out the cropping. I need to cut out the white/black or whatever uniform border exists in the images being processed.
But I need to keep the image in a perfect square. Like 300x300 pixels.
So, for example, if the image being cropped has a lengthy focus, it would crop the white space / margin until it reaches the top and bottom. it would then only crop the left and right to a point where the size of the left and right equals the length. Either by removing only a partial amount of white-space (margin) - or if need be, add some white-space (margin).