IM equivalent to Adobe JS action script
Posted: 2015-12-04T13:49:07-07:00
Hi everyone, can someone help me convert this adobe action script to something in imagemagick.
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.
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))