I am frequently presented with the task of resizing images (lots of them) to a square and then saving them with PhotoShop. For example, if an image is 400x200 then I would n
Used this script it errors out.
if (doc.width !== doc.height) { // if document is notalready square...
if (doc.width > doc.height) { // if width is greater...
doc.resizeCanvas(doc.width, doc.width) // use this value for both sides...
else { // else use height for both sides...
doc.resizeCanvas(doc.height, doc.height) // so you always get a square.
} }
It says illegal use of else on line 4