Copy link to clipboard
Copied
Hello, new to this group but have been using photoshop for years doing basic editing. I have never done any sripting. I have a project on my hands. I have a lot of image of various sizes with some taller or wider than others. I need to make all these images exactly square though. Currently they vary and are wider or taller etc.
I was wondering what process I could use hopefully with batch editing but was told scripting might be the answer to automate this process as I have about 8,000 images.
So for example one image might be 200 pixels wide and 400 pixels high and another is 100 pixels high and 600 pixels wide and so on. I would need the
1st example to be 400 x 400 and the 2nd example 600 x 600.
I am using photoshop 5.5
The software for a shopping cart is using a feature that allows you to zoom in on the image but if it is not perfectly square the image doesn't appear
well in the software. Using magento e-commerce.
Thanks for your help and any thoughts on this project of mine.
Dave
Copy link to clipboard
Copied
You need Photoshop 7 or higher to use scripting.
Copy link to clipboard
Copied
OK, so if I get 7 or higher is there a script that would do this and could anyone share it with me please?
Thanks,
Dave
Copy link to clipboard
Copied
Here a simple script the does what I think you want.
// squares the canvas. uses the background color
var doc = activeDocument;
var maxDim = Math.max( doc.width, doc.height );
doc.resizeCanvas( maxDim, maxDim, AnchorPosition.MIDDLECENTER );
Find more inspiration, events, and resources on the new Adobe Community
Explore Now