I'm having trouble using the trace function. I can get it to livetrace a raster image but I can't seem to adjust any of the properties (blur, min path size, etc.). Can anyone offer any help? Thanks a lot.
Thanks, but to tell you the truth I can't seem to get anything to work.
Say I wanted trace any raster object on a particular layer and set the the blur property to 10 and the resample to 150?
I've got some cool ideas and can think of step by step methods to achieve them but when it comes to writing the code, I trip all over the syntax and structure.
Any help would be awesome. I've attached a sample of what my end product will do to photos. Kinda of a manic painting style. I can do it manually, probably even set up an action to do it but I want to eventually make some animations with it and getting it in script form would be a lot more efficient.
This will trace every raster item in the currently selected layer:
var sel = document.getItems({
type: 'Raster'
});
for (i=0, l=sel.length; i<l; i++){
if (sel[i].layer.active == true){
var tracing = new Tracing(sel[i]);
tracing.mode = 'color';
tracing.blur = 10;
tracing.resampleResolution = 150;
}
}
If you want it to run through every raster item in the document across all layers, just remove lines 5 and 10.
If you have a second...
Is there a simple way to get this to work with Raster items and PlacedFile items? I've tried using " || " in the "type" input but then the script stops working. I can get it to work with either separately though.
Is there a way to "ignore white" with the tracing function?