Copy link to clipboard
Copied
I'm looking for a simple script to apply clipping path>detect edges to whatever image is selected. I'm a bit new to scripting, any ideas?
Something like this:
try {
var sel = app.selection[0];
if (sel.graphics.length) {
sel.graphics[0].clippingPath.clippingType = ClippingPathType.DETECT_EDGES;
}
else {
sel.clippingPath.clippingType = ClippingPathType.DETECT_EDGES;
}
} catch(e) {
//alert(e);
}
Copy link to clipboard
Copied
Something like this:
try {
var sel = app.selection[0];
if (sel.graphics.length) {
sel.graphics[0].clippingPath.clippingType = ClippingPathType.DETECT_EDGES;
}
else {
sel.clippingPath.clippingType = ClippingPathType.DETECT_EDGES;
}
} catch(e) {
//alert(e);
}
Copy link to clipboard
Copied
This worked flawlessly, thank you so much!
Copy link to clipboard
Copied
This worked perfectly, thank you!