Link in Zwischenablage kopieren
Kopiert
How can you make a selection based on color
For example, all pixels white?
Something like this:
app.activeDocument.Selection.select(0,White);
Thanks!
Use the AM code ScriptingListener.plugin creates when you perform the corresponding operation (in this case this could for example be Color Range).
Link in Zwischenablage kopieren
Kopiert
Use the AM code ScriptingListener.plugin creates when you perform the corresponding operation (in this case this could for example be Color Range).
Link in Zwischenablage kopieren
Kopiert
Bonjour
You can use the function selectColorRange() - xbytor in xtools ( xtools ) - stdlib.js
"
//RechercheBlanc.jsx
//RechercheBlanc.jsx
//Recherche une couleur
var chercheCouleur = new SolidColor();
chercheCouleur.rgb.red=255;
chercheCouleur.rgb.green=255;
chercheCouleur.rgb.blue=255;
selectColorRange(chercheCouleur);
function selectColorRange(scObj)
{
var desc = new ActionDescriptor();
desc.putInteger( charIDToTypeID( "Fzns" ), 0 );
var cDesc = new ActionDescriptor();
cDesc.putDouble( charIDToTypeID( "Rd " ), scObj.rgb.red);
cDesc.putDouble( charIDToTypeID( "Grn " ), scObj.rgb.green);
cDesc.putDouble( charIDToTypeID( "Bl " ), scObj.rgb.blue );
desc.putObject( charIDToTypeID( "Mnm " ), charIDToTypeID( "RGBC" ), cDesc );
desc.putObject( charIDToTypeID( "Mxm " ), charIDToTypeID( "RGBC" ), cDesc );
executeAction( charIDToTypeID( "ClrR" ), desc, DialogModes.NO );
}
"
Link in Zwischenablage kopieren
Kopiert
Thank you
It really select the white, but I do not understand anything, what it ActionDescriptor, PutDouble?
And whether it is possible to increase the range of selection, have not only one color?
Link in Zwischenablage kopieren
Kopiert
1/
you gotta ask .... xbytor
2/
By using methodes store() load() - SelectionType.INTERSECT // EXTEND REPLACE ???
Link in Zwischenablage kopieren
Kopiert
Thank you very much
Weitere Inspirationen, Events und Ressourcen finden Sie in der neuen Adobe Community
Jetzt ansehen