Empty Smartfilter mask
Hi,
is there a possibility to check if the smartfilter mask is pure white?
Kind Regards
Joe
Hi,
is there a possibility to check if the smartfilter mask is pure white?
Kind Regards
Joe
Try
var d = new ActionDescriptor();
var r = new ActionReference();
r.putProperty(stringIDToTypeID("channel"), stringIDToTypeID("selection"));
d.putReference(stringIDToTypeID("null"), r);
var r1 = new ActionReference();
r1.putEnumerated(stringIDToTypeID("channel"), stringIDToTypeID("channel"), stringIDToTypeID("filterMask"));
d.putReference(stringIDToTypeID("to"), r1);
executeAction(stringIDToTypeID("set"), d, DialogModes.NO);
var pure_white = true;
try { app.activeDocument.selection.bounds; } catch (e) { pure_white = false; }
if (pure_white)
{
app.activeDocument.selection.invert();
try { app.activeDocument.selection.bounds; pure_white = false; } catch (e) {}
app.activeDocument.selection.deselect();
}
alert(pure_white?"Pure white":"Not Pure white");
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.