IM equivalent to Adobe JS action script

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
thes4s67
Posts: 3
Joined: 2015-10-05T08:37:22-07:00
Authentication code: 1151

IM equivalent to Adobe JS action script

Post 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.
thes4s67
Posts: 3
Joined: 2015-10-05T08:37:22-07:00
Authentication code: 1151

Re: IM equivalent to Adobe JS action script

Post by thes4s67 »

I was able to figure it out!
Post Reply