I have the following Photoshop ExtendScript (.jsx) script which rotates the image canvas, but doesn't rotate the contents:

var doc = app.open(...);       // open the .png file

if (doc.width > doc.height) {  // check if this document is landscape
  doc.rotateCanvas(90);        // rotate the canvas to portrait

  // but how to rotate the contents?
}

I would like to rotate the entire image, contents included. I've tried also rotating all the document's layers, and art layers, but nothing works.

有帮助吗?

解决方案

So... uh... yeah. If you want to rotate a PNG in Photoshop, the above script would be the way to do it. Code not shown here might cause it do something different, preventing the rotate from succeeding :).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top