This content has been marked as final.
Show 3 replies
-
1. Re: How to add an art layer posterize levels 50 with javascript?
Muppet Mark Jul 25, 2014 4:23 AM (in response to KOSUTE)You can do 2 ways… Using the DOM or scriptlistener…
#target photoshop var doc = app.activeDocument.artLayers[0].posterize( 50 ); //posterizeLayer( 50 ); function posterizeLayer( numb ) { function cTID(s) { return app.charIDToTypeID(s); }; //function sTID(s) { return app.stringIDToTypeID(s); }; var desc66 = new ActionDescriptor(); desc66.putInteger( cTID( 'Lvls' ), numb ); executeAction( cTID( 'Pstr' ), desc66, DialogModes.NO ); };artLayers is an Array so target the one you want by index… No need for the .add()
-
2. Re: How to add an art layer posterize levels 50 with javascript?
KOSUTE Jul 25, 2014 7:45 AM (in response to Muppet Mark)You awesome Muppet MarK!
Thank you !
-
3. Re: How to add an art layer posterize levels 50 with javascript?
Muppet Mark Jul 25, 2014 8:33 AM (in response to KOSUTE)And ur mad it's a one liner...! (DOM)
You were close but no cigar...!
Sent from my iPhone

