Resize batch images in PhotoShop

后端 未结 4 1837
天命终不由人
天命终不由人 2021-01-20 21:36

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

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-20 22:22

    The error occurs because there is a missing '}' at the end of line 3. The if-term has to be close BEFORE the else-term is opened.

    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.
     }
    

提交回复
热议问题