Page 1 of 1

IM equivalent to Adobe JS action script

Posted: 2015-12-04T13:49:07-07:00
by thes4s67
Hi everyone, can someone help me convert this adobe action script to something in imagemagick.

Code: Select all

#target photoshop
app.preferences.rulerUnits = Units.PIXELS;
 
var backgroundC = new SolidColor();
    backgroundC.rgb.red = 255;
    backgroundC.rgb.green = 255;
    backgroundC.rgb.blue = 255;
    backgroundColor = backgroundC;
   
var doc = activeDocument
 
doc.resizeCanvas(Math.max(doc.width,doc.height),Math.max(doc.width,doc.height))
Basically this takes the image and turns it into a square and adds white background. I use the script in Photoshop, but I believe this can be done FASTER with ImageMagick. Any help is greatly appreciated.

Re: IM equivalent to Adobe JS action script

Posted: 2015-12-04T14:33:32-07:00
by thes4s67
I was able to figure it out!